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 7a5a0e9..7a6eef5 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py @@ -82,9 +82,6 @@ class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate', 'change_nova_service_state']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - # This means the action plan is superseded so we cannot trigger it, - # or it is empty. - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) 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 d97e25f..ea3c98d 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py @@ -56,9 +56,6 @@ class TestExecuteDummyStrategy(base.BaseInfraOptimScenarioTest): self.assertEqual(2, action_counter.get("nop")) self.assertEqual(1, action_counter.get("sleep")) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - # This means the action plan is superseded so we cannot trigger it, - # or it is empty. - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py b/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py index a4980f1..33c8cb0 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_host_maintenance.py @@ -70,8 +70,7 @@ class TestExecuteHostMaintenanceStrategy(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['change_nova_service_state', 'migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -104,8 +103,7 @@ class TestExecuteHostMaintenanceStrategy(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['change_nova_service_state', 'migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_node_resource_consolidation.py b/watcher_tempest_plugin/tests/scenario/test_execute_node_resource_consolidation.py index 52c8d9a..f5cd394 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_node_resource_consolidation.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_node_resource_consolidation.py @@ -68,10 +68,7 @@ class TestExecuteNodeResourceConsolidationStrategy( action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['change_nova_service_state', 'migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - # This means the action plan is superseded so we cannot trigger it, - # or it is empty. - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -100,9 +97,6 @@ class TestExecuteNodeResourceConsolidationStrategy( action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - # This means the action plan is superseded so we cannot trigger it, - # or it is empty. - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py b/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py index b70670f..d84741b 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_storage_balance.py @@ -63,7 +63,6 @@ class TestExecuteStorageCapacityBalanceStrategy( action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_strategies_real.py b/watcher_tempest_plugin/tests/scenario/test_execute_strategies_real.py index 5fef000..9d452b1 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_strategies_real.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_strategies_real.py @@ -97,8 +97,7 @@ class TestRealExecuteStrategies(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -144,8 +143,7 @@ class TestRealExecuteStrategies(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -189,7 +187,6 @@ class TestRealExecuteStrategies(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py b/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py index b9eaa04..085b0c0 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_vm_workload_consolidation.py @@ -86,9 +86,6 @@ class TestExecuteVmWorkloadBalanceStrategy(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['change_nova_service_state', 'migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - # This means the action plan is superseded so we cannot trigger it, - # or it is empty. - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py b/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py index 68a71b6..0936942 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_workload_balance.py @@ -87,8 +87,7 @@ class TestExecuteWorkloadBalanceStrategy(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -133,7 +132,6 @@ class TestExecuteWorkloadBalanceStrategy(base.BaseInfraOptimScenarioTest): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_workload_stabilization.py b/watcher_tempest_plugin/tests/scenario/test_execute_workload_stabilization.py index 10fc4b0..e25da69 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_workload_stabilization.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_workload_stabilization.py @@ -78,10 +78,7 @@ class TestExecuteWorkloadStabilizationStrategy( action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], expected_action_types=['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - # This means the action plan is superseded so we cannot trigger it, - # or it is empty. - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -119,9 +116,6 @@ class TestExecuteWorkloadStabilizationStrategy( action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], expected_action_types=['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - # This means the action plan is superseded so we cannot trigger it, - # or it is empty. - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py b/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py index 8820a83..92b61db 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_zone_migration.py @@ -74,8 +74,7 @@ class TestExecuteZoneMigrationStrategy(TestZoneMigrationStrategyBase): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -105,8 +104,7 @@ class TestExecuteZoneMigrationStrategy(TestZoneMigrationStrategyBase): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid']) @@ -184,8 +182,7 @@ class TestExecuteZoneMigrationStrategyVolume(TestZoneMigrationStrategyBase): action_plan, _ = self.get_action_plan_and_validate_actions( audit['uuid'], ['volume_migrate']) - if action_plan['state'] in ('SUPERSEDED', 'SUCCEEDED'): - return + self.assertEqual("RECOMMENDED", action_plan['state']) self.execute_action_plan_and_validate_states(action_plan['uuid'])