Refresh the state of the actionplan before asserting status

This is follow-up of [1]. That patch added a wait for actionplan to
reach finished state before checking the status. However, it is not
refreshing the state of the actionplan in the action_plan variable
before doint the actual assert, so it's still validating the state that
had before the wait.

[1] https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/968750

Closes-Bug: #2133181

Change-Id: Id3520d9293778694ee699be4b0b4ab07144dae3a
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
This commit is contained in:
Alfredo Moralejo
2025-12-12 08:19:55 +01:00
parent 62d4e34ff6
commit 03fdfc525d

View File

@@ -119,7 +119,8 @@ class TestContinuousAudit(base.BaseInfraOptimScenarioTest):
# Since a new run of the continuous audit will change the last
# action plan to CANCELLED. It is hard to guarantee that we will
# always have a SUCCEEDED action plan.
self.assertIn(action_plan['state'], ('SUCCEEDED', 'CANCELLED'))
_, action_plan = self.client.show_action_plan(action_plan["uuid"])
self.assertIn(action_plan.get('state'), ('SUCCEEDED', 'CANCELLED'))
# Action plan should have no actions
created_actions = self.client.list_actions(