Rename 'TRIGGERED' state as 'PENDING'
"TRIGGERED" is not the correct word to use to describe the action state, we should use "PENDING" instead. Change-Id: If24979cdb916523861324f7bcc024e2f1fc28b05 Closes-Bug: #1548377
This commit is contained in:
@@ -83,10 +83,10 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest):
|
||||
|
||||
_, action_plan = self.client.show_action_plan(action_plan['uuid'])
|
||||
|
||||
# Execute the action by changing its state to TRIGGERED
|
||||
# Execute the action by changing its state to PENDING
|
||||
_, updated_ap = self.client.update_action_plan(
|
||||
action_plan['uuid'],
|
||||
patch=[{'path': '/state', 'op': 'replace', 'value': 'TRIGGERED'}]
|
||||
patch=[{'path': '/state', 'op': 'replace', 'value': 'PENDING'}]
|
||||
)
|
||||
|
||||
self.assertTrue(test.call_until_true(
|
||||
@@ -97,7 +97,7 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest):
|
||||
))
|
||||
_, finished_ap = self.client.show_action_plan(action_plan['uuid'])
|
||||
|
||||
self.assertIn(updated_ap['state'], ('TRIGGERED', 'ONGOING'))
|
||||
self.assertIn(updated_ap['state'], ('PENDING', 'ONGOING'))
|
||||
self.assertEqual(finished_ap['state'], 'SUCCEEDED')
|
||||
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@ class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest):
|
||||
|
||||
_, action_plan = self.client.show_action_plan(action_plan['uuid'])
|
||||
|
||||
# Execute the action by changing its state to TRIGGERED
|
||||
# Execute the action by changing its state to PENDING
|
||||
_, updated_ap = self.client.update_action_plan(
|
||||
action_plan['uuid'],
|
||||
patch=[{'path': '/state', 'op': 'replace', 'value': 'TRIGGERED'}]
|
||||
patch=[{'path': '/state', 'op': 'replace', 'value': 'PENDING'}]
|
||||
)
|
||||
|
||||
self.assertTrue(test.call_until_true(
|
||||
@@ -139,7 +139,7 @@ class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest):
|
||||
_, action_list = self.client.list_actions(
|
||||
action_plan_uuid=finished_ap["uuid"])
|
||||
|
||||
self.assertIn(updated_ap['state'], ('TRIGGERED', 'ONGOING'))
|
||||
self.assertIn(updated_ap['state'], ('PENDING', 'ONGOING'))
|
||||
self.assertEqual(finished_ap['state'], 'SUCCEEDED')
|
||||
|
||||
for action in action_list['actions']:
|
||||
|
||||
@@ -51,10 +51,10 @@ class TestExecuteDummyStrategy(base.BaseInfraOptimScenarioTest):
|
||||
|
||||
_, action_plan = self.client.show_action_plan(action_plan['uuid'])
|
||||
|
||||
# Execute the action by changing its state to TRIGGERED
|
||||
# Execute the action by changing its state to PENDING
|
||||
_, updated_ap = self.client.update_action_plan(
|
||||
action_plan['uuid'],
|
||||
patch=[{'path': '/state', 'op': 'replace', 'value': 'TRIGGERED'}]
|
||||
patch=[{'path': '/state', 'op': 'replace', 'value': 'PENDING'}]
|
||||
)
|
||||
|
||||
self.assertTrue(test.call_until_true(
|
||||
@@ -70,7 +70,7 @@ class TestExecuteDummyStrategy(base.BaseInfraOptimScenarioTest):
|
||||
action_counter = collections.Counter(
|
||||
act['action_type'] for act in action_list['actions'])
|
||||
|
||||
self.assertIn(updated_ap['state'], ('TRIGGERED', 'ONGOING'))
|
||||
self.assertIn(updated_ap['state'], ('PENDING', 'ONGOING'))
|
||||
self.assertEqual(finished_ap['state'], 'SUCCEEDED')
|
||||
|
||||
# A dummy strategy generates 2 "nop" actions and 1 "sleep" action
|
||||
|
||||
Reference in New Issue
Block a user