diff --git a/watcher_tempest_plugin/tests/api/admin/base.py b/watcher_tempest_plugin/tests/api/admin/base.py index 23624cc46..2c7b618dd 100644 --- a/watcher_tempest_plugin/tests/api/admin/base.py +++ b/watcher_tempest_plugin/tests/api/admin/base.py @@ -28,7 +28,7 @@ class BaseInfraOptimTest(test.BaseTestCase): # States where the object is waiting for some event to perform a transition IDLE_STATES = ('RECOMMENDED', 'FAILED', 'SUCCEEDED', 'CANCELLED') # States where the object can only be DELETED (end of its life-cycle) - FINISHED_STATES = ('FAILED', 'SUCCEEDED', 'CANCELLED') + FINISHED_STATES = ('FAILED', 'SUCCEEDED', 'CANCELLED', 'SUPERSEDED') @classmethod def setup_credentials(cls): diff --git a/watcher_tempest_plugin/tests/api/admin/test_action_plan.py b/watcher_tempest_plugin/tests/api/admin/test_action_plan.py index 9bc4add8d..710b19b64 100644 --- a/watcher_tempest_plugin/tests/api/admin/test_action_plan.py +++ b/watcher_tempest_plugin/tests/api/admin/test_action_plan.py @@ -101,7 +101,7 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest): _, finished_ap = self.client.show_action_plan(action_plan['uuid']) self.assertIn(updated_ap['state'], ('PENDING', 'ONGOING')) - self.assertEqual('SUCCEEDED', finished_ap['state']) + self.assertIn(finished_ap['state'], ('SUCCEEDED', 'SUPERSEDED')) class TestShowListActionPlan(base.BaseInfraOptimTest): diff --git a/watcher_tempest_plugin/tests/scenario/base.py b/watcher_tempest_plugin/tests/scenario/base.py index faaf2cee9..a166d1709 100644 --- a/watcher_tempest_plugin/tests/scenario/base.py +++ b/watcher_tempest_plugin/tests/scenario/base.py @@ -155,4 +155,5 @@ class BaseInfraOptimScenarioTest(manager.ScenarioTest): def has_action_plan_finished(self, action_plan_uuid): _, action_plan = self.client.show_action_plan(action_plan_uuid) - return action_plan.get('state') in ('FAILED', 'SUCCEEDED', 'CANCELLED') + return action_plan.get('state') in ('FAILED', 'SUCCEEDED', 'CANCELLED', + 'SUPERSEDED') diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py b/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py index b0175980a..c20123bc5 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py @@ -175,7 +175,7 @@ class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest): action_plan_uuid=finished_ap["uuid"]) self.assertIn(updated_ap['state'], ('PENDING', 'ONGOING')) - self.assertEqual('SUCCEEDED', finished_ap['state']) + self.assertIn(finished_ap['state'], ('SUCCEEDED', 'SUPERSEDED')) for action in action_list['actions']: self.assertEqual('SUCCEEDED', action.get('state')) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py b/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py index 247acad91..bd016c275 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py @@ -72,7 +72,7 @@ class TestExecuteDummyStrategy(base.BaseInfraOptimScenarioTest): act['action_type'] for act in action_list['actions']) self.assertIn(updated_ap['state'], ('PENDING', 'ONGOING')) - self.assertEqual('SUCCEEDED', finished_ap['state']) + self.assertIn(finished_ap['state'], ('SUCCEEDED', 'SUPERSEDED')) # A dummy strategy generates 2 "nop" actions and 1 "sleep" action self.assertEqual(3, len(action_list['actions']))