From fa1d77c15a7af6b4d678b1d19f7a85f754eb6ff9 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Thu, 30 Jan 2020 12:39:52 +0000 Subject: [PATCH] Fix hacluster pause/resume tests The hacluster tests used to pause the hacluster subordinate but then rely on the unintended side-effect of the prinicple going into a blocked state to confirm the action was complete. This is not what the old amulet tests used to do. Also, more importantly, the side-effect has been fixed so the tests no longer worrk. --- zaza/openstack/charm_tests/hacluster/tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zaza/openstack/charm_tests/hacluster/tests.py b/zaza/openstack/charm_tests/hacluster/tests.py index 7ac67dc..fb9d8e2 100644 --- a/zaza/openstack/charm_tests/hacluster/tests.py +++ b/zaza/openstack/charm_tests/hacluster/tests.py @@ -86,11 +86,13 @@ class HaclusterTest(test_utils.OpenStackBaseTest): for subordinate in primary_status["units"][leader]["subordinates"]: logging.info("Pausing {}".format(subordinate)) zaza.model.run_action(subordinate, "pause") - zaza.model.block_until_unit_wl_status(leader, "blocked") + zaza.model.block_until_unit_wl_status( + subordinate, + "maintenance") logging.info("Resuming {}".format(subordinate)) zaza.model.run_action(subordinate, "resume") - zaza.model.block_until_unit_wl_status(leader, "active") + zaza.model.block_until_unit_wl_status(subordinate, "active") _states = {"hacluster": { "workload-status": "active",