]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite: Add reproducer for issue 71911
authorZack Cerza <zack@cerza.org>
Mon, 30 Jun 2025 21:02:11 +0000 (15:02 -0600)
committerVallari Agrawal <val.agl002@gmail.com>
Tue, 1 Jul 2025 15:15:19 +0000 (20:45 +0530)
See: https://tracker.ceph.com/issues/71911

Signed-off-by: Zack Cerza <zack@cerza.org>
(cherry picked from commit be1d157d5a27e5eaaa791f674ee34e25d718ff61)

teuthology/suite/test/test_run_.py

index 31a23a98e811086a1ad5b0962672436183f547e2..a8a0aaaa93b6aac42e7fbdf9d487a119b2ab35e4 100644 (file)
@@ -197,6 +197,20 @@ class TestRun(object):
             self.klass(self.args)
         m_smtp.assert_not_called()
 
+    @patch('teuthology.suite.run.util.fetch_repos')
+    @patch('teuthology.suite.util.git_ls_remote')
+    @patch('teuthology.suite.run.util.package_version_for_hash')
+    def test_os_type(self, m_pvfh, m_git_ls_remote, m_fetch_repos):
+        m_git_ls_remote.return_value = "sha1"
+        del self.args['distro']
+        run_ = run.Run(self.args)
+        run_.base_args = run_.build_base_args()
+        configs = [
+            ["desc", [], {"os_type": "debian", "os_version": "8.0"}],
+        ]
+        missing, to_schedule = run_.collect_jobs('x86_64', configs, False, False)
+        assert to_schedule[0]['yaml']['os_type'] == "debian"
+        assert to_schedule[0]['yaml']['os_version'] == "8.0"
 
 class TestScheduleSuite(object):
     klass = run.Run