diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-09-12 23:15:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 23:15:37 -0400 |
commit | da1b27cbc9294993343c6dee3065a6b57aa148c2 (patch) | |
tree | ddaef75a6e267689c873a1e8e886cd362ba3ff0b /roles/openshift_health_checker/test/action_plugin_test.py | |
parent | 6078b3b18e50947d88195ae47285e37a3581bc35 (diff) | |
parent | 5f54a91de69bafa70fc4e2657c8bdd8a82c54f11 (diff) | |
download | openshift-da1b27cbc9294993343c6dee3065a6b57aa148c2.tar.gz openshift-da1b27cbc9294993343c6dee3065a6b57aa148c2.tar.bz2 openshift-da1b27cbc9294993343c6dee3065a6b57aa148c2.tar.xz openshift-da1b27cbc9294993343c6dee3065a6b57aa148c2.zip |
Merge pull request #5365 from sosiouxme/20170908-disconnected-image-check
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_health_checker/test/action_plugin_test.py')
-rw-r--r-- | roles/openshift_health_checker/test/action_plugin_test.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/roles/openshift_health_checker/test/action_plugin_test.py b/roles/openshift_health_checker/test/action_plugin_test.py index c109ebd24..58864da21 100644 --- a/roles/openshift_health_checker/test/action_plugin_test.py +++ b/roles/openshift_health_checker/test/action_plugin_test.py @@ -110,11 +110,16 @@ def test_action_plugin_skip_non_active_checks(plugin, task_vars, monkeypatch): assert not skipped(result) -def test_action_plugin_skip_disabled_checks(plugin, task_vars, monkeypatch): +@pytest.mark.parametrize('to_disable', [ + 'fake_check', + ['fake_check', 'spam'], + '*,spam,eggs', +]) +def test_action_plugin_skip_disabled_checks(to_disable, plugin, task_vars, monkeypatch): checks = [fake_check('fake_check', is_active=True)] monkeypatch.setattr('openshift_checks.OpenShiftCheck.subclasses', classmethod(lambda cls: checks)) - task_vars['openshift_disable_check'] = 'fake_check' + task_vars['openshift_disable_check'] = to_disable result = plugin.run(tmp=None, task_vars=task_vars) assert result['checks']['fake_check'] == dict(skipped=True, skipped_reason="Disabled by user request") |