summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/test
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-08-21 13:37:25 +0200
committerRodolfo Carvalho <rhcarvalho@gmail.com>2017-08-24 15:00:12 +0200
commita28796fc669bd40f9384118f278b62001a15214d (patch)
tree553e484dac1c5a5dc6e88fec8e6006b3c623bb19 /roles/openshift_health_checker/test
parent25276bda8c002f4279e5c1748f64a9fd1ee999a4 (diff)
downloadopenshift-a28796fc669bd40f9384118f278b62001a15214d.tar.gz
openshift-a28796fc669bd40f9384118f278b62001a15214d.tar.bz2
openshift-a28796fc669bd40f9384118f278b62001a15214d.tar.xz
openshift-a28796fc669bd40f9384118f278b62001a15214d.zip
List known checks/tags when check name is invalid
Diffstat (limited to 'roles/openshift_health_checker/test')
-rw-r--r--roles/openshift_health_checker/test/action_plugin_test.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/roles/openshift_health_checker/test/action_plugin_test.py b/roles/openshift_health_checker/test/action_plugin_test.py
index f73eb4f6e..2274cbd21 100644
--- a/roles/openshift_health_checker/test/action_plugin_test.py
+++ b/roles/openshift_health_checker/test/action_plugin_test.py
@@ -218,24 +218,21 @@ def test_resolve_checks_ok(names, all_checks, expected):
assert resolve_checks(names, all_checks) == expected
-@pytest.mark.parametrize('names,all_checks,words_in_exception,words_not_in_exception', [
+@pytest.mark.parametrize('names,all_checks,words_in_exception', [
(
['testA', 'testB'],
[],
['check', 'name', 'testA', 'testB'],
- ['tag', 'group', '@'],
),
(
['@group'],
[],
['tag', 'name', 'group'],
- ['check', '@'],
),
(
['testA', 'testB', '@group'],
[],
['check', 'name', 'testA', 'testB', 'tag', 'group'],
- ['@'],
),
(
['testA', 'testB', '@group'],
@@ -245,13 +242,10 @@ def test_resolve_checks_ok(names, all_checks, expected):
fake_check('from_group_2', ['preflight', 'group']),
],
['check', 'name', 'testA', 'testB'],
- ['tag', 'group', '@'],
),
])
-def test_resolve_checks_failure(names, all_checks, words_in_exception, words_not_in_exception):
+def test_resolve_checks_failure(names, all_checks, words_in_exception):
with pytest.raises(Exception) as excinfo:
resolve_checks(names, all_checks)
for word in words_in_exception:
assert word in str(excinfo.value)
- for word in words_not_in_exception:
- assert word not in str(excinfo.value)