From ec5a892697b19c56235a440ec93b95e3bc24b721 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 26 May 2020 14:41:27 -0600 Subject: [PATCH] Revert "test_run_with_watchdog_with_reporting(): ?" This reverts commit eb1080fb58febe1d3a729841f7d7e2cf1d4a4286. --- teuthology/test/test_worker.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/teuthology/test/test_worker.py b/teuthology/test/test_worker.py index 0e051f8dd6..d966d3476b 100644 --- a/teuthology/test/test_worker.py +++ b/teuthology/test/test_worker.py @@ -158,6 +158,25 @@ class TestWorker(object): dict(status='dead') ) + @patch("subprocess.Popen") + @patch("teuthology.worker.symlink_worker_log") + @patch("time.sleep") + def test_run_with_watchdog_with_reporting(self, m_sleep, m_symlink_log, m_popen): + config = { + "name": "the_name", + "job_id": "1", + "worker_log": "worker_log", + "archive_path": "archive/path", + "teuthology_branch": "jewel" + } + process = Mock() + process.poll.return_value = "not None" + m_proc = Mock() + m_proc.poll.return_value = "not None" + m_popen.return_value = m_proc + worker.run_with_watchdog(process, config) + m_symlink_log.assert_called_with(config["worker_log"], config["archive_path"]) + @patch("os.path.isdir") @patch("teuthology.worker.fetch_teuthology") @patch("teuthology.worker.fetch_qa_suite") -- 2.39.5