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.
This commit is contained in:
Liam Young
2020-01-30 12:39:52 +00:00
parent a82914c2bc
commit fa1d77c15a

View File

@@ -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",