diff options
author | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2017-06-23 15:31:12 +0200 |
---|---|---|
committer | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2017-08-24 14:59:50 +0200 |
commit | 25276bda8c002f4279e5c1748f64a9fd1ee999a4 (patch) | |
tree | 227dfc6dbdb776c89f9911fe984aea5b4db08330 /roles/openshift_health_checker/test | |
parent | f98c978bd49f2473ce271d4fc69be7e4eea78125 (diff) | |
download | openshift-25276bda8c002f4279e5c1748f64a9fd1ee999a4.tar.gz openshift-25276bda8c002f4279e5c1748f64a9fd1ee999a4.tar.bz2 openshift-25276bda8c002f4279e5c1748f64a9fd1ee999a4.tar.xz openshift-25276bda8c002f4279e5c1748f64a9fd1ee999a4.zip |
List existing health checks when none is requested
This is a simple mechanism to learn what health checks are available.
Note that we defer task_vars verification, so that we can compute
requested_checks and resolved_checks earlier, allowing us to list checks
even if openshift_facts has not run.
Diffstat (limited to 'roles/openshift_health_checker/test')
-rw-r--r-- | roles/openshift_health_checker/test/action_plugin_test.py | 3 |
1 files changed, 2 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 f5161d6f5..f73eb4f6e 100644 --- a/roles/openshift_health_checker/test/action_plugin_test.py +++ b/roles/openshift_health_checker/test/action_plugin_test.py @@ -80,7 +80,8 @@ def skipped(result): None, {}, ]) -def test_action_plugin_missing_openshift_facts(plugin, task_vars): +def test_action_plugin_missing_openshift_facts(plugin, task_vars, monkeypatch): + monkeypatch.setattr('openshift_health_check.resolve_checks', lambda *args: ['fake_check']) result = plugin.run(tmp=None, task_vars=task_vars) assert failed(result, msg_has=['openshift_facts']) |