]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
run: make fetching tasks work for non-scheduled jobs
authorJosh Durgin <jdurgin@redhat.com>
Mon, 7 Mar 2022 18:34:36 +0000 (18:34 +0000)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 11 Mar 2022 01:48:41 +0000 (01:48 +0000)
The qa path should be the default (just like it's set by
teuthology-suite), and we actually need to do the import to access the
tasks.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
teuthology/run.py
teuthology/test/test_run.py

index 37fb42b6029c50b735ccbae98dd3e4c29d9d0472..ceccfd8f699e32de79a8f6cd879de5c8c809992c 100644 (file)
@@ -88,7 +88,7 @@ def fetch_tasks_if_needed(job_config):
     suite_sha1 = job_config.get('suite_sha1')
     suite_path = os.path.normpath(os.path.join(
         fetch_qa_suite(suite_branch, commit=suite_sha1),
-        job_config.get('suite_relpath', ''),
+        job_config.get('suite_relpath', 'qa'),
     ))
     sys.path.insert(1, suite_path)
     return suite_path
index f08082f58c67ec6f21fb7f9980f6013b11ab0a12..09ed9516e1918c435981e7a9b1b886bbd4b4f0f2 100644 (file)
@@ -115,7 +115,7 @@ class TestRun(object):
         m_fetch_qa_suite.return_value = "/some/other/suite/path"
         result = run.fetch_tasks_if_needed(config)
         m_fetch_qa_suite.assert_called_with("feature_branch", commit="commit")
-        assert result == "/some/other/suite/path"
+        assert result == "/some/other/suite/path/qa"
 
     @patch("teuthology.run.get_status")
     @patch("teuthology.run.nuke")