diff options
author | Luke Meyer <lmeyer@redhat.com> | 2017-07-10 16:58:31 -0400 |
---|---|---|
committer | Luke Meyer <lmeyer@redhat.com> | 2017-07-11 13:27:58 -0400 |
commit | 5f51278dee925c47055aacbb8ffac5e351ea7ee2 (patch) | |
tree | fe70cda4e9793f9b932418b83efa94d273664510 /roles/openshift_health_checker/test | |
parent | 23946219b23a416a4a2bbf4ebc14d6e02a9c2709 (diff) | |
download | openshift-5f51278dee925c47055aacbb8ffac5e351ea7ee2.tar.gz openshift-5f51278dee925c47055aacbb8ffac5e351ea7ee2.tar.bz2 openshift-5f51278dee925c47055aacbb8ffac5e351ea7ee2.tar.xz openshift-5f51278dee925c47055aacbb8ffac5e351ea7ee2.zip |
openshift_checks: fix execute_module params
Fix where execute_module was being passed task_vars in place of tmp
param. Most modules don't seem to use either and so this doesn't fail;
but under some conditions (perhaps different per version of ansible?) it
tried to treat the dict as a string and came back with a python stack
trace.
Diffstat (limited to 'roles/openshift_health_checker/test')
-rw-r--r-- | roles/openshift_health_checker/test/kibana_test.py | 2 | ||||
-rw-r--r-- | roles/openshift_health_checker/test/logging_check_test.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/openshift_health_checker/test/kibana_test.py b/roles/openshift_health_checker/test/kibana_test.py index 19140a1b6..40a5d19d8 100644 --- a/roles/openshift_health_checker/test/kibana_test.py +++ b/roles/openshift_health_checker/test/kibana_test.py @@ -169,7 +169,7 @@ def test_get_kibana_url(route, expect_url, expect_error): ), ]) def test_verify_url_internal_failure(exec_result, expect): - check = Kibana(execute_module=lambda module_name, args, task_vars: dict(failed=True, msg=exec_result)) + check = Kibana(execute_module=lambda module_name, args, tmp, task_vars: dict(failed=True, msg=exec_result)) check._get_kibana_url = lambda task_vars: ('url', None) error = check._check_kibana_route({}) diff --git a/roles/openshift_health_checker/test/logging_check_test.py b/roles/openshift_health_checker/test/logging_check_test.py index b6db34fe3..3b9e3fa8d 100644 --- a/roles/openshift_health_checker/test/logging_check_test.py +++ b/roles/openshift_health_checker/test/logging_check_test.py @@ -80,7 +80,7 @@ plain_curator_pod = { ("Permission denied", "Unexpected error using `oc`"), ]) def test_oc_failure(problem, expect): - def execute_module(module_name, args, task_vars): + def execute_module(module_name, args, tmp, task_vars): if module_name == "ocutil": return dict(failed=True, result=problem) return dict(changed=False) |