[autotest] Fix scheduler unittesting framework.
They're alive! Most of the fixes here are to adapt to the fact that we
no longer default to running a cleanup post-job, and that any
verify+cleanup before a job gets merged into a reset.
There's also some mocking out of global_config because extended use of
the scheduler_config forces us to provide a mocked value for any setting
touched in a test.
BUG=chromium:305072
DEPLOY=scheduler
TEST=this?
Change-Id: Ie7ada591c31766f30647fd6c4ba151e5dd0d1003
Reviewed-on: https://chromium-review.googlesource.com/58380
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
diff --git a/scheduler/scheduler_models_unittest.py b/scheduler/scheduler_models_unittest.py
index 9b73694..446e960 100755
--- a/scheduler/scheduler_models_unittest.py
+++ b/scheduler/scheduler_models_unittest.py
@@ -372,7 +372,7 @@
tasks = self._test_pre_job_tasks_helper(
reboot_before=model_attributes.RebootBefore.NEVER)
- self.assertEqual(tasks, [])
+ self._check_special_tasks(tasks, [(models.SpecialTask.Task.VERIFY, 1)])
def test_run_asynchronous_do_not_reset(self):
@@ -383,7 +383,7 @@
tasks = self._test_pre_job_tasks_helper(
reboot_before=model_attributes.RebootBefore.NEVER)
- self.assertEqual(tasks, [])
+ self._check_special_tasks(tasks, [(models.SpecialTask.Task.VERIFY, 1)])
def test_run_atomic_group_already_started(self):