summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/test
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-06-30 15:13:31 -0400
committerGitHub <noreply@github.com>2017-06-30 15:13:31 -0400
commita4eccf0279529c2179afd72cf2b478e1ff51cf86 (patch)
tree60d66697e019bae2ebb7b2c76736bffb235291e5 /roles/openshift_health_checker/test
parentfb3ca7fedf8f9a791b5e01d91e1613a325cf3107 (diff)
parent11040f1b76981c22d62d17d1d22a3741e50a27fd (diff)
downloadopenshift-a4eccf0279529c2179afd72cf2b478e1ff51cf86.tar.gz
openshift-a4eccf0279529c2179afd72cf2b478e1ff51cf86.tar.bz2
openshift-a4eccf0279529c2179afd72cf2b478e1ff51cf86.tar.xz
openshift-a4eccf0279529c2179afd72cf2b478e1ff51cf86.zip
Merge pull request #4565 from rhcarvalho/handle-incorrect-check-names
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_health_checker/test')
-rw-r--r--roles/openshift_health_checker/test/action_plugin_test.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/roles/openshift_health_checker/test/action_plugin_test.py b/roles/openshift_health_checker/test/action_plugin_test.py
index 6ebf0ebb2..9383b233c 100644
--- a/roles/openshift_health_checker/test/action_plugin_test.py
+++ b/roles/openshift_health_checker/test/action_plugin_test.py
@@ -59,7 +59,7 @@ def failed(result, msg_has=None):
if msg_has is not None:
assert 'msg' in result
for term in msg_has:
- assert term in result['msg']
+ assert term.lower() in result['msg'].lower()
return result.get('failed', False)
@@ -178,6 +178,16 @@ def test_action_plugin_run_check_exception(plugin, task_vars, monkeypatch):
assert not skipped(result)
+def test_action_plugin_resolve_checks_exception(plugin, task_vars, monkeypatch):
+ monkeypatch.setattr(plugin, 'load_known_checks', lambda: {})
+
+ result = plugin.run(tmp=None, task_vars=task_vars)
+
+ assert failed(result, msg_has=['unknown', 'name'])
+ assert not changed(result)
+ assert not skipped(result)
+
+
@pytest.mark.parametrize('names,all_checks,expected', [
([], [], set()),
(