Skip to content

Commit

Permalink
Merge pull request #1672 from kshtsk/wip-fix-test-worker
Browse files Browse the repository at this point in the history
test/test_worker: fix test_prep_job teuth_config mocking
  • Loading branch information
kshtsk authored Sep 6, 2021
2 parents df69d6d + 484ad8f commit b135a4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions teuthology/test/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ def test_run_with_watchdog_with_reporting(self, m_sleep, m_symlink_log, m_popen)

@patch("os.path.isdir")
@patch("teuthology.worker.fetch_teuthology")
@patch("teuthology.worker.teuth_config")
@patch("teuthology.worker.fetch_qa_suite")
def test_prep_job(self, m_fetch_qa_suite,
m_teuth_config,
m_fetch_teuthology, m_isdir):
config = dict(
name="the_name",
Expand All @@ -191,6 +193,7 @@ def test_prep_job(self, m_fetch_qa_suite,
m_fetch_teuthology.return_value = '/teuth/path'
m_fetch_qa_suite.return_value = '/suite/path'
m_isdir.return_value = True
m_teuth_config.teuthology_path = None
got_config, teuth_bin_path = worker.prep_job(
config,
log_file_path,
Expand Down

0 comments on commit b135a4f

Please sign in to comment.