diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-07-03 11:06:18 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-07-05 10:30:53 -0400 |
commit | 09e74fa8f619038ea06723392ce0d620ffbc6d3a (patch) | |
tree | e3c17249a47ed0d70c99c22ef8f8426655a83245 /roles/openshift_health_checker/test/action_plugin_test.py | |
parent | 7b5c476ecd2e6d3cf26bea294e5b7c141d061384 (diff) | |
parent | 0d0f54af3a02cd0e228210dfae95806d4e644c3b (diff) | |
download | openshift-09e74fa8f619038ea06723392ce0d620ffbc6d3a.tar.gz openshift-09e74fa8f619038ea06723392ce0d620ffbc6d3a.tar.bz2 openshift-09e74fa8f619038ea06723392ce0d620ffbc6d3a.tar.xz openshift-09e74fa8f619038ea06723392ce0d620ffbc6d3a.zip |
Merge branch 'master' into encryption
Diffstat (limited to 'roles/openshift_health_checker/test/action_plugin_test.py')
-rw-r--r-- | roles/openshift_health_checker/test/action_plugin_test.py | 12 |
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()), ( |