From: Andrew Schoen Date: Tue, 9 Dec 2014 16:39:34 +0000 (-0600) Subject: ensures owner and machine_type are added to fake_ctx with the correct values if they... X-Git-Tag: 1.1.0~1067^2~14^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=30678b4f330bd15079947903e2b512703358a967;p=teuthology.git ensures owner and machine_type are added to fake_ctx with the correct values if they're missing from args Signed-off-by: Andrew Schoen --- diff --git a/teuthology/test/test_run.py b/teuthology/test/test_run.py index e6b49ec91b..82caad6d24 100644 --- a/teuthology/test/test_run.py +++ b/teuthology/test/test_run.py @@ -152,9 +152,7 @@ class TestRun(object): "--verbose", "--archive", "some/archive/dir", "--description", "the_description", - "--owner", "the_owner", "--lock", - "--machine-type", "machine_type", "--os-type", "os_type", "--os-version", "os_version", "--block", @@ -178,7 +176,7 @@ class TestRun(object): "the_owner" ) m_try_push_job_info.assert_called_with(config, dict(status='running')) - m_get_machine_type.assert_called_with("machine_type", config) + m_get_machine_type.assert_called_with(None, config) m_get_summary.assert_called_with("the_owner", "the_description") m_get_initial_tasks.assert_called_with(True, config, "machine_type") m_fetch_tasks_if_needed.assert_called_with(config) @@ -193,3 +191,6 @@ class TestRun(object): assert isinstance(fake_ctx["config"], dict) assert isinstance(fake_ctx["summary"], dict) assert "tasks" in fake_ctx["config"] + # ensures that values missing in args are added with the correct value + assert fake_ctx["owner"] == "the_owner" + assert fake_ctx["machine_type"] == "machine_type"