From 9698f76b641b7cc5964d2f4f318ea71702aa2245 Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Wed, 20 Sep 2017 21:35:57 -0400 Subject: health checks: add diagnostics check Also, moved is_first_master method into superclass for reuse. And look at oo_first_master and ansible_host instead of masters and ansible_ssh_host. --- roles/openshift_health_checker/test/logging_check_test.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'roles/openshift_health_checker/test/logging_check_test.py') diff --git a/roles/openshift_health_checker/test/logging_check_test.py b/roles/openshift_health_checker/test/logging_check_test.py index 1a1c190f6..59c703214 100644 --- a/roles/openshift_health_checker/test/logging_check_test.py +++ b/roles/openshift_health_checker/test/logging_check_test.py @@ -98,21 +98,19 @@ def test_oc_failure(problem, expect): assert expect in str(excinfo) -groups_with_first_master = dict(masters=['this-host', 'other-host']) -groups_with_second_master = dict(masters=['other-host', 'this-host']) -groups_not_a_master = dict(masters=['other-host']) +groups_with_first_master = dict(oo_first_master=['this-host']) +groups_not_a_master = dict(oo_first_master=['other-host'], oo_masters=['other-host']) @pytest.mark.parametrize('groups, logging_deployed, is_active', [ (groups_with_first_master, True, True), (groups_with_first_master, False, False), (groups_not_a_master, True, False), - (groups_with_second_master, True, False), (groups_not_a_master, True, False), ]) def test_is_active(groups, logging_deployed, is_active): task_vars = dict( - ansible_ssh_host='this-host', + ansible_host='this-host', groups=groups, openshift_hosted_logging_deploy=logging_deployed, ) -- cgit v1.2.3