diff --git a/mistral_tempest_tests/tests/api/v2/test_action_executions.py b/mistral_tempest_tests/tests/api/v2/test_action_executions.py index 2d635fc..143461d 100644 --- a/mistral_tempest_tests/tests/api/v2/test_action_executions.py +++ b/mistral_tempest_tests/tests/api/v2/test_action_executions.py @@ -16,6 +16,7 @@ import json import six from oslo_log import log as logging +from tempest.lib import decorators from tempest.lib import exceptions from tempest import test @@ -54,6 +55,7 @@ class ActionExecutionTestsV2(base.TestCase): super(ActionExecutionTestsV2, cls).resource_cleanup() @test.attr(type='sanity') + @decorators.idempotent_id('a72603bd-5d49-4d92-9747-8da6322e867d') def test_run_action_execution(self): resp, body = self.client.create_action_execution( { @@ -70,12 +72,14 @@ class ActionExecutionTestsV2(base.TestCase): ) @test.attr(type='sanity') + @decorators.idempotent_id('0623cb62-b20a-45c8-afd9-8da46e1bb3cb') def test_list_action_executions(self): resp, body = self.client.get_list_obj('action_executions') self.assertEqual(200, resp.status) @test.attr(type='sanity') + @decorators.idempotent_id('cd36ea00-7e22-4c3d-90c3-fb441b93cf12') def test_output_appear_in_response_only_when_needed(self): resp, body = self.client.get_list_obj('action_executions') @@ -124,6 +128,7 @@ class ActionExecutionTestsV2(base.TestCase): self.assertNotIn("output", action_execution) @test.attr(type='sanity') + @decorators.idempotent_id('dc76aeda-9243-45cf-bfd2-141d3af8b28b') def test_run_action_std_http(self): resp, body = self.client.create_action_execution( { @@ -137,6 +142,7 @@ class ActionExecutionTestsV2(base.TestCase): self.assertTrue(output['result']['status'] in range(200, 307)) @test.attr(type='sanity') + @decorators.idempotent_id('befa9b1c-01a4-41bc-b060-88cb1b147dfb') def test_run_action_std_http_error(self): resp, body = self.client.create_action_execution( { @@ -150,6 +156,7 @@ class ActionExecutionTestsV2(base.TestCase): self.assertEqual(404, output['result']['status']) @test.attr(type='sanity') + @decorators.idempotent_id('d98586bf-fdc4-44f6-9837-700d35b5f889') def test_create_action_execution(self): resp, body = self.client.create_action_execution( { @@ -177,6 +184,7 @@ class ActionExecutionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('99f22c17-6fb4-4480-96d3-4a82672916b7') def test_delete_nonexistent_action_execution(self): self.assertRaises( exceptions.NotFound, @@ -186,6 +194,7 @@ class ActionExecutionTestsV2(base.TestCase): ) @test.attr(type='sanity') + @decorators.idempotent_id('2dbd74ba-4950-4c52-8bd3-070d634dcd05') def test_create_action_execution_sync(self): token = self.client.auth_provider.get_token() resp, body = self.client.create_action_execution( diff --git a/mistral_tempest_tests/tests/api/v2/test_actions.py b/mistral_tempest_tests/tests/api/v2/test_actions.py index 7d49794..48ea4ad 100644 --- a/mistral_tempest_tests/tests/api/v2/test_actions.py +++ b/mistral_tempest_tests/tests/api/v2/test_actions.py @@ -13,6 +13,7 @@ # under the License. import datetime +from tempest.lib import decorators from tempest.lib import exceptions from tempest import test @@ -37,6 +38,7 @@ class ActionTestsV2(base.TestCase): super(ActionTestsV2, self).tearDown() @test.attr(type='smoke') + @decorators.idempotent_id('2e1a578a-1c27-409a-96be-84b5c41498cd') def test_get_list_actions(self): resp, body = self.client.get_list_obj('actions') @@ -45,6 +47,7 @@ class ActionTestsV2(base.TestCase): self.assertNotIn('next', body) @test.attr(type='smoke') + @decorators.idempotent_id('786ee85c-c32d-4ac9-8f45-79ab6bc47ef1') def test_get_list_actions_with_pagination(self): resp, body = self.client.get_list_obj( 'actions?limit=1&sort_keys=name&sort_dirs=desc' @@ -84,6 +87,7 @@ class ActionTestsV2(base.TestCase): self.assertGreater(name_1, name_2) @test.attr(type='negative') + @decorators.idempotent_id('5148358e-200f-49c7-8e88-1ddeec61c6a9') def test_get_list_actions_nonexist_sort_dirs(self): context = self.assertRaises( exceptions.BadRequest, @@ -97,6 +101,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('85482ce8-70f4-47a6-9e80-de1ac22b6412') def test_get_list_actions_invalid_limit(self): context = self.assertRaises( exceptions.BadRequest, @@ -110,6 +115,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('a203e75b-2013-422f-b9eb-da4375041058') def test_get_list_actions_duplicate_sort_keys(self): context = self.assertRaises( exceptions.BadRequest, @@ -123,6 +129,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='smoke') + @decorators.idempotent_id('9a53af71-8f1e-4ad5-b572-2c4c621715c0') def test_get_list_actions_equal_to_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -138,6 +145,7 @@ class ActionTestsV2(base.TestCase): self.assertFalse(act['is_system']) @test.attr(type='smoke') + @decorators.idempotent_id('3c3d28ce-9490-41ae-a918-c28f843841e1') def test_get_list_actions_not_equal_to_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -153,6 +161,7 @@ class ActionTestsV2(base.TestCase): self.assertTrue(act['is_system']) @test.attr(type='smoke') + @decorators.idempotent_id('84823a84-5caa-427d-8a2c-622a1d1893b1') def test_get_list_actions_in_list_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -169,6 +178,7 @@ class ActionTestsV2(base.TestCase): self.assertListEqual(created_acts, action_names) @test.attr(type='smoke') + @decorators.idempotent_id('4b05dfcf-ef39-4032-9528-c8422c7329dd') def test_get_list_actions_not_in_list_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -186,6 +196,7 @@ class ActionTestsV2(base.TestCase): self.assertNotIn(act, action_names) @test.attr(type='smoke') + @decorators.idempotent_id('20b3d527-447d-492b-8cb7-ac5e3757d7d5') def test_get_list_actions_greater_than_filter(self): time = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S") resp, body = self.client.get_list_obj( @@ -196,6 +207,7 @@ class ActionTestsV2(base.TestCase): self.assertEqual([], body['actions']) @test.attr(type='smoke') + @decorators.idempotent_id('7f598dba-f169-47ec-a487-f0ed31484aff') def test_get_list_actions_greater_than_equal_to_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -212,6 +224,7 @@ class ActionTestsV2(base.TestCase): self.assertIn(created_acts[0], actions) @test.attr(type='smoke') + @decorators.idempotent_id('874fb57d-a762-4dc3-841d-396657510d23') def test_get_list_actions_less_than_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -228,6 +241,7 @@ class ActionTestsV2(base.TestCase): self.assertNotIn(created_acts[0], actions) @test.attr(type='smoke') + @decorators.idempotent_id('1fda6c31-b0c3-4b78-9f67-b920e1f6c973') def test_get_list_actions_less_than_equal_to_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -244,6 +258,7 @@ class ActionTestsV2(base.TestCase): self.assertIn(created_acts[0], actions) @test.attr(type='smoke') + @decorators.idempotent_id('cbb716f1-7fc7-4884-8fa9-6ff2bc35ee29') def test_get_list_actions_multiple_filter(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -261,6 +276,7 @@ class ActionTestsV2(base.TestCase): self.assertIn(created_acts[0], actions) @test.attr(type='negative') + @decorators.idempotent_id('45fdc1f3-4d89-4035-9b76-08ef94c92628') def test_get_list_actions_invalid_filter(self): self.assertRaises( exceptions.BadRequest, @@ -279,6 +295,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='sanity') + @decorators.idempotent_id('5dbceaf3-6a32-4a4f-9427-1bbdb6f3c574') def test_create_and_delete_few_actions(self): resp, body = self.client.create_action('action_v2.yaml') self.assertEqual(201, resp.status) @@ -302,6 +319,7 @@ class ActionTestsV2(base.TestCase): self.client.actions.remove(act) @test.attr(type='sanity') + @decorators.idempotent_id('d7dad5de-6b1f-4813-b789-78f075252639') def test_get_action(self): _, body = self.client.create_action('action_v2.yaml') action_name = body['actions'][0]['name'] @@ -311,6 +329,7 @@ class ActionTestsV2(base.TestCase): self.assertEqual(action_name, body['name']) @test.attr(type='sanity') + @decorators.idempotent_id('21a031c8-8e2d-421f-8dfe-71a3b5e44381') def test_update_action(self): _, body = self.client.create_action('action_v2.yaml') action = body['actions'][0]['name'] @@ -334,6 +353,7 @@ class ActionTestsV2(base.TestCase): for item in body['actions']])) @test.attr(type='sanity') + @decorators.idempotent_id('329b1030-c55c-45f0-8129-cc892bc23dcc') def test_get_action_definition(self): _, body = self.client.create_action('action_v2.yaml') act_name = body['actions'][0]['name'] @@ -344,6 +364,7 @@ class ActionTestsV2(base.TestCase): self.assertIn(act_name, body) @test.attr(type='negative') + @decorators.idempotent_id('c2b5be88-571a-4855-922f-9a338dba6adb') def test_get_nonexistent_action(self): self.assertRaises( exceptions.NotFound, @@ -352,6 +373,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('fc2fafcb-9bb4-4a18-a507-3f9964f4a08a') def test_double_creation(self): self.client.create_action('action_v2.yaml') @@ -362,6 +384,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('0c456a73-9c39-4aeb-b3ca-3ea4338bc9ab') def test_create_action_invalid_def(self): self.assertRaises( exceptions.BadRequest, @@ -370,6 +393,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('469677b5-22ab-4e2a-aee6-5bcc9dac93de') def test_update_action_invalid_def(self): self.assertRaises( exceptions.BadRequest, @@ -378,6 +402,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('ab444607-40fc-47cb-982f-83762d5b64c9') def test_delete_nonexistent_action(self): self.assertRaises( exceptions.NotFound, @@ -386,6 +411,7 @@ class ActionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('74d0d480-793a-46ca-b88a-8336c1897f3a') def test_delete_standard_action(self): self.assertRaises( exceptions.BadRequest, diff --git a/mistral_tempest_tests/tests/api/v2/test_cron_triggers.py b/mistral_tempest_tests/tests/api/v2/test_cron_triggers.py index 3a0b0c5..acff08f 100644 --- a/mistral_tempest_tests/tests/api/v2/test_cron_triggers.py +++ b/mistral_tempest_tests/tests/api/v2/test_cron_triggers.py @@ -13,6 +13,7 @@ # under the License. from oslo_concurrency.fixture import lockutils +from tempest.lib import decorators from tempest.lib import exceptions from tempest import test @@ -42,6 +43,7 @@ class CronTriggerTestsV2(base.TestCase): super(CronTriggerTestsV2, self).tearDown() @test.attr(type='smoke') + @decorators.idempotent_id('c53b44dd-59b3-4a4b-b22a-21abb4cecea0') def test_get_list_cron_triggers(self): resp, body = self.client.get_list_obj('cron_triggers') @@ -49,6 +51,7 @@ class CronTriggerTestsV2(base.TestCase): self.assertEqual([], body['cron_triggers']) @test.attr(type='sanity') + @decorators.idempotent_id('fbc641fa-8704-45b3-b259-136eb956394c') def test_create_and_delete_cron_triggers(self): tr_name = 'trigger' @@ -72,6 +75,7 @@ class CronTriggerTestsV2(base.TestCase): self.assertNotIn(tr_name, trs_names) @test.attr(type='sanity') + @decorators.idempotent_id('b8b9102e-b323-492f-af41-4f5368971e36') def test_create_and_delete_oneshot_cron_triggers(self): tr_name = 'trigger' @@ -96,6 +100,7 @@ class CronTriggerTestsV2(base.TestCase): self.assertNotIn(tr_name, trs_names) @test.attr(type='sanity') + @decorators.idempotent_id('5224359b-3c31-4fe7-a4eb-dc9da843137e') def test_create_two_cron_triggers_for_one_wf(self): tr_name_1 = 'trigger1' tr_name_2 = 'trigger2' @@ -118,6 +123,7 @@ class CronTriggerTestsV2(base.TestCase): self.assertIn(tr_name_2, trs_names) @test.attr(type='sanity') + @decorators.idempotent_id('967da6e3-f9a2-430a-9390-0d73f2143aba') def test_get_cron_trigger(self): tr_name = 'trigger' self.client.create_cron_trigger( @@ -129,36 +135,42 @@ class CronTriggerTestsV2(base.TestCase): self.assertEqual(tr_name, body['name']) @test.attr(type='negative') + @decorators.idempotent_id('d0e4d894-9a50-4919-a008-a9f255b6b6a3') def test_create_cron_trigger_nonexistent_wf(self): self.assertRaises(exceptions.NotFound, self.client.create_cron_trigger, 'trigger', 'nonexist', None, '5 * * * *') @test.attr(type='negative') + @decorators.idempotent_id('83f0d420-fd3c-4e75-87b1-854cefb28bda') def test_create_cron_trigger_invalid_count(self): self.assertRaises(exceptions.BadRequest, self.client.create_cron_trigger, 'trigger', 'nonexist', None, '5 * * * *', None, "q") @test.attr(type='negative') + @decorators.idempotent_id('4190e0af-3c64-4f57-a0b8-d9d3d41fd323') def test_create_cron_trigger_negative_count(self): self.assertRaises(exceptions.BadRequest, self.client.create_cron_trigger, 'trigger', 'nonexist', None, '5 * * * *', None, -1) @test.attr(type='negative') + @decorators.idempotent_id('210c37e8-990e-4260-b3b3-93f254e6a4d7') def test_create_cron_trigger_invalid_first_date(self): self.assertRaises(exceptions.BadRequest, self.client.create_cron_trigger, 'trigger', 'nonexist', None, '5 * * * *', "q") @test.attr(type='negative') + @decorators.idempotent_id('17990a39-8f66-4748-8ba5-ca87befbb198') def test_create_cron_trigger_count_only(self): self.assertRaises(exceptions.BadRequest, self.client.create_cron_trigger, 'trigger', 'nonexist', None, None, None, "42") @test.attr(type='negative') + @decorators.idempotent_id('029e0a1e-2252-4a37-b9bd-cfbe407c6ade') def test_create_cron_trigger_date_and_count_without_pattern(self): self.assertRaises(exceptions.BadRequest, self.client.create_cron_trigger, @@ -166,18 +178,21 @@ class CronTriggerTestsV2(base.TestCase): "4242-12-25 13:37", "42") @test.attr(type='negative') + @decorators.idempotent_id('54650d60-ec17-44b7-8732-2183852789ae') def test_get_nonexistent_cron_trigger(self): self.assertRaises(exceptions.NotFound, self.client.get_object, 'cron_triggers', 'trigger') @test.attr(type='negative') + @decorators.idempotent_id('c663599e-5cd7-49ff-9c0f-f82a5bcc5fdb') def test_delete_nonexistent_trigger(self): self.assertRaises(exceptions.NotFound, self.client.delete_obj, 'cron_triggers', 'trigger') @test.attr(type='negative') + @decorators.idempotent_id('d1328d2b-5dc2-4521-93ec-d734d5fb4df7') def test_create_two_cron_triggers_with_same_name(self): tr_name = 'trigger' self.client.create_cron_trigger( @@ -187,6 +202,7 @@ class CronTriggerTestsV2(base.TestCase): tr_name, self.wf_name, None, '5 * * * *') @test.attr(type='negative') + @decorators.idempotent_id('3e51fc44-ce38-4653-9e4e-08b077a1dbc5') def test_create_two_cron_triggers_with_same_pattern(self): self.client.create_cron_trigger( 'trigger1', @@ -208,12 +224,14 @@ class CronTriggerTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('6f3c08f3-9498-410e-a44b-4f9c6c971405') def test_invalid_cron_pattern_not_enough_params(self): self.assertRaises(exceptions.BadRequest, self.client.create_cron_trigger, 'trigger', self.wf_name, None, '5 *') @test.attr(type='negative') + @decorators.idempotent_id('26cb52e7-1ef3-45a2-a870-1baec2382c55') def test_invalid_cron_pattern_out_of_range(self): self.assertRaises(exceptions.BadRequest, self.client.create_cron_trigger, diff --git a/mistral_tempest_tests/tests/api/v2/test_event_triggers.py b/mistral_tempest_tests/tests/api/v2/test_event_triggers.py index c2dbac3..f04e7c2 100644 --- a/mistral_tempest_tests/tests/api/v2/test_event_triggers.py +++ b/mistral_tempest_tests/tests/api/v2/test_event_triggers.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from tempest.lib import decorators from tempest.lib import exceptions from tempest import test @@ -52,6 +53,7 @@ class EventTriggerTestsV2(base.TestCase): super(EventTriggerTestsV2, self).tearDown() @test.attr(type='sanity') + @decorators.idempotent_id('cfdf9aee-09ce-49bf-af05-97c5542bc131') def test_create_get_delete_event_trigger(self): name = 'my_event_trigger' @@ -78,18 +80,21 @@ class EventTriggerTestsV2(base.TestCase): self.assertNotIn(name, trs_names) @test.attr(type='negative') + @decorators.idempotent_id('20e547d6-9a16-4cac-9b1a-f3520c58cdd7') def test_create_event_trigger_without_necessary_param(self): self.assertRaises(exceptions.BadRequest, self.client.create_event_trigger, self.wf_id, EXCHANGE, EVENT_ENGINE_TOPIC, '') @test.attr(type='negative') + @decorators.idempotent_id('ed02f500-9436-4a7b-a135-f210e1c32b22') def test_create_event_trigger_with_nonexist_wf(self): self.assertRaises(exceptions.BadRequest, self.client.create_event_trigger, 'nonexist', EXCHANGE, EVENT_ENGINE_TOPIC, EVENT) @test.attr(type='negative') + @decorators.idempotent_id('0ab556b6-ab76-492e-8eef-c79955003a93') def test_create_event_trigger_duplicate(self): name = 'my_event_trigger' @@ -101,6 +106,7 @@ class EventTriggerTestsV2(base.TestCase): self.wf_id, EXCHANGE, EVENT_ENGINE_TOPIC, EVENT) @test.attr(type='negative') + @decorators.idempotent_id('56b90a90-9ff3-42f8-a9eb-04a77198710e') def test_get_nonexistent_event_trigger(self): fake_id = '123e4567-e89b-12d3-a456-426655440000' diff --git a/mistral_tempest_tests/tests/api/v2/test_executions.py b/mistral_tempest_tests/tests/api/v2/test_executions.py index 3410c4b..28c9891 100644 --- a/mistral_tempest_tests/tests/api/v2/test_executions.py +++ b/mistral_tempest_tests/tests/api/v2/test_executions.py @@ -13,6 +13,7 @@ # under the License. from oslo_concurrency.fixture import lockutils +from tempest.lib import decorators from tempest.lib import exceptions from tempest import test @@ -47,12 +48,14 @@ class ExecutionTestsV2(base.TestCase): super(ExecutionTestsV2, self).tearDown() @test.attr(type='smoke') + @decorators.idempotent_id('c0b4b658-6f01-4680-b402-2f683b3d78b6') def test_get_list_executions(self): resp, body = self.client.get_list_obj('executions') self.assertEqual(200, resp.status) self.assertNotIn('next', body) @test.attr(type='smoke') + @decorators.idempotent_id('0bfcb4b0-b1e4-4499-b81b-0e86c8a2a841') def test_get_list_executions_with_pagination(self): resp, body = self.client.create_execution(self.direct_wf_name) exec_id_1 = body['id'] @@ -108,6 +111,7 @@ class ExecutionTestsV2(base.TestCase): self.assertGreater(workflow_name_2, workflow_name_1) @test.attr(type='sanity') + @decorators.idempotent_id('5d8ebe04-8de6-414d-908f-213af59e4c6a') def test_create_execution_for_direct_wf(self): resp, body = self.client.create_execution(self.direct_wf_name) exec_id = body['id'] @@ -120,6 +124,7 @@ class ExecutionTestsV2(base.TestCase): [ex_id['id'] for ex_id in body['executions']]) @test.attr(type='sanity') + @decorators.idempotent_id('101bfdff-8309-4add-9504-544b15f13d95') def test_create_execution_for_reverse_wf(self): resp, body = self.client.create_execution( self.reverse_wf['name'], @@ -143,6 +148,7 @@ class ExecutionTestsV2(base.TestCase): self.assertEqual('SUCCESS', body['state']) @test.attr(type='sanity') + @decorators.idempotent_id('2df30966-9c45-4a2e-942d-e74bd92cb5aa') def test_create_execution_by_wf_id(self): resp, body = self.client.create_execution(self.direct_wf_id) exec_id = body['id'] @@ -157,6 +163,7 @@ class ExecutionTestsV2(base.TestCase): ) @test.attr(type='sanity') + @decorators.idempotent_id('f7f50198-2dbd-4ca1-af51-d0eadc1108ac') def test_get_execution(self): _, execution = self.client.create_execution(self.direct_wf_name) @@ -169,6 +176,7 @@ class ExecutionTestsV2(base.TestCase): self.assertEqual(execution['id'], body['id']) @test.attr(type='sanity') + @decorators.idempotent_id('2f142ba0-6b88-4d63-8544-05c3dbfe13cc') def test_update_execution_pause(self): _, execution = self.client.create_execution(self.direct_wf_name) resp, body = self.client.update_execution( @@ -178,6 +186,7 @@ class ExecutionTestsV2(base.TestCase): self.assertEqual('PAUSED', body['state']) @test.attr(type='sanity') + @decorators.idempotent_id('f0557236-55ab-457d-9197-05bc2ae53e21') def test_update_execution_description(self): _, execution = self.client.create_execution(self.direct_wf_name) resp, body = self.client.update_execution( @@ -187,6 +196,7 @@ class ExecutionTestsV2(base.TestCase): self.assertEqual('description', body['description']) @test.attr(type='sanity') + @decorators.idempotent_id('c54b4d68-b179-4339-bdab-a91cd6e819b7') def test_update_execution_fail(self): _, execution = self.client.create_execution(self.direct_wf_name) resp, body = self.client.update_execution( @@ -197,11 +207,13 @@ class ExecutionTestsV2(base.TestCase): self.assertEqual('Forced', body['state_info']) @test.attr(type='negative') + @decorators.idempotent_id('d8bde271-6785-4ace-9173-a8a3a01d5eaa') def test_get_nonexistent_execution(self): self.assertRaises(exceptions.NotFound, self.client.get_object, 'executions', '1a2b3c') @test.attr(type='negative') + @decorators.idempotent_id('e26e31ba-88cf-4b90-8b3a-fd4ecc612252') def test_update_nonexistent_execution(self): put_body = '{"state": "STOPPED"}' @@ -210,18 +222,21 @@ class ExecutionTestsV2(base.TestCase): '1a2b3c', put_body) @test.attr(type='negative') + @decorators.idempotent_id('b337e270-b3b6-41e2-8de2-05030b06fc37') def test_delete_nonexistent_execution(self): self.assertRaises(exceptions.NotFound, self.client.delete_obj, 'executions', 'nonexist') @test.attr(type='negative') + @decorators.idempotent_id('46f7b4b0-7d4a-4bdc-b2b6-46343cdd6f3a') def test_create_ex_for_nonexistent_wf(self): self.assertRaises(exceptions.NotFound, self.client.create_execution, 'nonexist') @test.attr(type='negative') + @decorators.idempotent_id('9d27247e-b4d4-40ab-9181-9986655a6be4') def test_create_execution_for_reverse_wf_invalid_start_task(self): self.assertRaises( exceptions.BadRequest, @@ -232,6 +247,7 @@ class ExecutionTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('0d6ac42b-4059-40ef-99d0-a65b3cd1837c') def test_create_execution_forgot_input_params(self): self.assertRaises( exceptions.BadRequest, @@ -241,6 +257,7 @@ class ExecutionTestsV2(base.TestCase): ) @test.attr(type='sanity') + @decorators.idempotent_id('52779c73-7563-47b2-8231-a24d6bf531a7') def test_action_ex_concurrency(self): resp, wf = self.client.create_workflow("wf_action_ex_concurrency.yaml") self.assertEqual(201, resp.status) @@ -254,6 +271,7 @@ class ExecutionTestsV2(base.TestCase): self.client.wait_execution_success(execution) @test.attr(type='sanity') + @decorators.idempotent_id('eb061c4d-2892-47f0-81e6-37ba15c376bb') def test_task_ex_concurrency(self): resp, wf = self.client.create_workflow("wf_task_ex_concurrency.yaml") self.assertEqual(201, resp.status) diff --git a/mistral_tempest_tests/tests/api/v2/test_tasks.py b/mistral_tempest_tests/tests/api/v2/test_tasks.py index c71c31c..8708d72 100644 --- a/mistral_tempest_tests/tests/api/v2/test_tasks.py +++ b/mistral_tempest_tests/tests/api/v2/test_tasks.py @@ -13,6 +13,7 @@ # under the License. from oslo_concurrency.fixture import lockutils +from tempest.lib import decorators from tempest import test from mistral_tempest_tests.tests import base @@ -42,6 +43,7 @@ class TasksTestsV2(base.TestCase): super(TasksTestsV2, self).tearDown() @test.attr(type='smoke') + @decorators.idempotent_id('81159dce-3802-44ee-a8d4-5ddca106fd91') def test_get_tasks_list(self): resp, body = self.client.get_list_obj('tasks') @@ -49,6 +51,7 @@ class TasksTestsV2(base.TestCase): self.assertNotEmpty(body['tasks']) @test.attr(type='sanity') + @decorators.idempotent_id('f62664de-bd2b-4153-8d0f-5a76d78abbad') def test_get_task(self): resp, body = self.client.get_list_obj('tasks') @@ -58,6 +61,7 @@ class TasksTestsV2(base.TestCase): ) @test.attr(type='sanity') + @decorators.idempotent_id('3230d694-40fd-4094-ad12-024f40a21b94') def test_get_tasks_of_execution(self): resp, body = self.client.get_list_obj( 'tasks?workflow_execution_id=%s' % self.execution_id @@ -83,6 +87,7 @@ class TaskTypesTestsV2(base.TestCase): _, execution = self.client.create_execution(self.nested_wf_name) @test.attr(type='sanity') + @decorators.idempotent_id('1ac726eb-b945-4b82-8755-a2fb2dc009bc') def test_task_type(self): resp, body = self.client.get_list_obj('tasks') diff --git a/mistral_tempest_tests/tests/api/v2/test_workbooks.py b/mistral_tempest_tests/tests/api/v2/test_workbooks.py index 787b0af..87f6756 100644 --- a/mistral_tempest_tests/tests/api/v2/test_workbooks.py +++ b/mistral_tempest_tests/tests/api/v2/test_workbooks.py @@ -13,6 +13,7 @@ # under the License. from oslo_concurrency.fixture import lockutils +from tempest.lib import decorators from tempest.lib import exceptions from tempest import test @@ -31,6 +32,7 @@ class WorkbookTestsV2(base.TestCase): super(WorkbookTestsV2, self).tearDown() @test.attr(type='smoke') + @decorators.idempotent_id('4d8752b9-8d69-4d81-8710-5dd8ef699b95') def test_get_list_workbooks(self): resp, body = self.client.get_list_obj('workbooks') @@ -38,6 +40,7 @@ class WorkbookTestsV2(base.TestCase): self.assertEqual([], body['workbooks']) @test.attr(type='sanity') + @decorators.idempotent_id('1a078ca2-bcf9-4eb9-8ed5-e3545038aa76') def test_create_and_delete_workbook(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) resp, body = self.client.create_workbook('wb_v2.yaml') @@ -55,6 +58,7 @@ class WorkbookTestsV2(base.TestCase): self.assertEqual([], body['workbooks']) @test.attr(type='sanity') + @decorators.idempotent_id('80f7d7a6-2821-4ab0-b090-ca45c98258ba') def test_get_workbook(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workbook('wb_v2.yaml') @@ -65,6 +69,7 @@ class WorkbookTestsV2(base.TestCase): self.assertEqual(name, body['name']) @test.attr(type='sanity') + @decorators.idempotent_id('4d3b1e43-a493-41be-9c8a-389511675403') def test_update_workbook(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workbook('wb_v2.yaml') @@ -75,6 +80,7 @@ class WorkbookTestsV2(base.TestCase): self.assertEqual(name, body['name']) @test.attr(type='sanity') + @decorators.idempotent_id('506cdcc2-082f-4e1f-9ab2-717acd7f0eb5') def test_get_workbook_definition(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workbook('wb_v2.yaml') @@ -85,17 +91,20 @@ class WorkbookTestsV2(base.TestCase): self.assertIsNotNone(body) @test.attr(type='negative') + @decorators.idempotent_id('d99f11c1-05a3-4d90-89c6-8d85558d3708') def test_get_nonexistent_workbook_definition(self): self.assertRaises(exceptions.NotFound, self.client.get_definition, 'workbooks', 'nonexist') @test.attr(type='negative') + @decorators.idempotent_id('61ed021e-ec56-42cb-ad05-eb6979aa00fd') def test_get_nonexistent_workbook(self): self.assertRaises(exceptions.NotFound, self.client.get_object, 'workbooks', 'nonexist') @test.attr(type='negative') + @decorators.idempotent_id('e3d76f8b-220d-4250-8238-0ba27fda6de9') def test_double_create_workbook(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workbook('wb_v2.yaml') @@ -111,6 +120,7 @@ class WorkbookTestsV2(base.TestCase): self.assertEqual([], body['workbooks']) @test.attr(type='negative') + @decorators.idempotent_id('1cd6f6f7-b166-454e-96d2-bf1f95c23015') def test_create_wb_with_invalid_def(self): self.assertRaises( exceptions.BadRequest, @@ -119,6 +129,7 @@ class WorkbookTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('ac9a05d3-e285-4d88-91eb-fb9ad694a89a') def test_update_wb_with_invalid_def(self): self.assertRaises( exceptions.BadRequest, diff --git a/mistral_tempest_tests/tests/api/v2/test_workflows.py b/mistral_tempest_tests/tests/api/v2/test_workflows.py index fbc457f..0195fee 100644 --- a/mistral_tempest_tests/tests/api/v2/test_workflows.py +++ b/mistral_tempest_tests/tests/api/v2/test_workflows.py @@ -14,6 +14,7 @@ import json from oslo_concurrency.fixture import lockutils +from tempest.lib import decorators from tempest.lib import exceptions from tempest import test @@ -33,6 +34,7 @@ class WorkflowTestsV2(base.TestCase): super(WorkflowTestsV2, self).tearDown() @test.attr(type='smoke') + @decorators.idempotent_id('e9cd6817-e8d1-4604-ba76-b0e17219f4c5') def test_get_list_workflows(self): resp, body = self.client.get_list_obj('workflows') self.assertEqual(200, resp.status) @@ -44,6 +46,7 @@ class WorkflowTestsV2(base.TestCase): self.assertNotIn('next', body) @test.attr(type='smoke') + @decorators.idempotent_id('be8a4a44-eeb3-48e3-b11d-b83ba14dbf2c') def test_get_list_workflows_by_admin(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) @@ -60,6 +63,7 @@ class WorkflowTestsV2(base.TestCase): self.assertIn(name, names) @test.attr(type='smoke') + @decorators.idempotent_id('c9e2ebbc-02aa-4c33-b244-e471c8266aa7') def test_get_list_workflows_with_project_by_admin(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) @@ -80,6 +84,7 @@ class WorkflowTestsV2(base.TestCase): self.assertIn(name, names) @test.attr(type='smoke') + @decorators.idempotent_id('b8dc1b02-8509-45e2-9df7-4630cdcfa1ab') def test_get_list_other_project_private_workflows(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) @@ -100,6 +105,7 @@ class WorkflowTestsV2(base.TestCase): self.assertNotIn(name, names) @test.attr(type='smoke') + @decorators.idempotent_id('2063143b-ced8-4037-9383-e2504be581e6') def test_get_list_workflows_with_fields(self): resp, body = self.client.get_list_obj('workflows?fields=name') @@ -109,6 +115,7 @@ class WorkflowTestsV2(base.TestCase): self.assertListEqual(sorted(['id', 'name']), sorted(list(wf))) @test.attr(type='smoke') + @decorators.idempotent_id('81f28735-e74e-4dc1-8b94-b548f8a80556') def test_get_list_workflows_with_pagination(self): resp, body = self.client.get_list_obj( 'workflows?limit=1&sort_keys=name&sort_dirs=desc' @@ -148,6 +155,7 @@ class WorkflowTestsV2(base.TestCase): self.assertGreater(name_1, name_2) @test.attr(type='negative') + @decorators.idempotent_id('cdb5586f-a72f-4371-88d1-1472675915c3') def test_get_list_workflows_nonexist_sort_dirs(self): context = self.assertRaises( exceptions.BadRequest, @@ -161,6 +169,7 @@ class WorkflowTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('ac41a0ea-2be6-4307-9003-6b8dd52b0bf9') def test_get_list_workflows_invalid_limit(self): context = self.assertRaises( exceptions.BadRequest, @@ -174,6 +183,7 @@ class WorkflowTestsV2(base.TestCase): ) @test.attr(type='negative') + @decorators.idempotent_id('55759713-a8d7-44c2-aff1-2383f51136bd') def test_get_list_workflows_duplicate_sort_keys(self): context = self.assertRaises( exceptions.BadRequest, @@ -187,6 +197,7 @@ class WorkflowTestsV2(base.TestCase): ) @test.attr(type='sanity') + @decorators.idempotent_id('e26b30b9-6699-4020-93a0-e25c2daca59a') def test_create_and_delete_workflow(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) resp, body = self.client.create_workflow('wf_v2.yaml') @@ -209,6 +220,7 @@ class WorkflowTestsV2(base.TestCase): self.assertNotIn(name, names) @test.attr(type='sanity') + @decorators.idempotent_id('f5a4a771-79b2-4f28-bfac-940aa83990a4') def test_get_workflow(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workflow('wf_v2.yaml') @@ -220,6 +232,7 @@ class WorkflowTestsV2(base.TestCase): self.assertEqual(name, body['name']) @test.attr(type='sanity') + @decorators.idempotent_id('f516aad0-9a50-4ace-a217-fa1931fd9335') def test_update_workflow(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workflow('wf_v2.yaml') @@ -231,6 +244,7 @@ class WorkflowTestsV2(base.TestCase): self.assertEqual(name, body['workflows'][0]['name']) @test.attr(type='sanity') + @decorators.idempotent_id('02bc1fc3-c31a-4e37-bb3d-eda46818505c') def test_get_workflow_definition(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workflow('wf_v2.yaml') @@ -242,6 +256,7 @@ class WorkflowTestsV2(base.TestCase): self.assertIsNotNone(body) @test.attr(type='sanity') + @decorators.idempotent_id('04fbd003-0e52-4034-858e-6634d4f84b29') def test_get_workflow_uploaded_in_wb(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workbook('wb_v2.yaml') @@ -254,17 +269,20 @@ class WorkflowTestsV2(base.TestCase): self.assertNotEmpty(wf_names) @test.attr(type='negative') + @decorators.idempotent_id('5e5f0403-fb2c-41ae-bf6f-25c181515358') def test_get_nonexistent_workflow_definition(self): self.assertRaises(exceptions.NotFound, self.client.get_definition, 'workflows', 'nonexist') @test.attr(type='negative') + @decorators.idempotent_id('23c72d01-c3bb-43d6-ba15-9b49c15f800c') def test_get_nonexistent_workflow(self): self.assertRaises(exceptions.NotFound, self.client.get_object, 'workflows', 'nonexist') @test.attr(type='negative') + @decorators.idempotent_id('6b917213-7f11-423a-8fe0-55795dcf0fb2') def test_double_create_workflows(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) _, body = self.client.create_workflow('wf_v2.yaml') @@ -273,18 +291,21 @@ class WorkflowTestsV2(base.TestCase): 'wf_v2.yaml') @test.attr(type='negative') + @decorators.idempotent_id('ffcd63d2-1104-4320-a67b-fadc4e2a0631') def test_create_wf_with_invalid_def(self): self.assertRaises(exceptions.BadRequest, self.client.create_workflow, 'wb_v1.yaml') @test.attr(type='negative') + @decorators.idempotent_id('eed46931-5485-436c-810f-1f63362223b9') def test_update_wf_with_invalid_def(self): self.assertRaises(exceptions.BadRequest, self.client.update_request, 'workflows', 'wb_v1.yaml') @test.attr(type='negative') + @decorators.idempotent_id('9b7f5b5a-cacd-4f98-a35a-decf065b8234') def test_delete_wf_with_trigger_associate(self): tr_name = 'trigger' resp, body = self.client.create_workflow('wf_v2.yaml') @@ -304,6 +325,7 @@ class WorkflowTestsV2(base.TestCase): self.client.triggers.remove(tr_name) @test.attr(type='negative') + @decorators.idempotent_id('46325022-cbd2-48f3-95f3-e587aab3b655') def test_delete_wf_with_event_trigger_associate(self): _, body = self.client.create_workflow('wf_v2.yaml') wf_id = body['workflows'][0]['id'] @@ -323,6 +345,7 @@ class WorkflowTestsV2(base.TestCase): self.client.event_triggers.remove(body['id']) @test.attr(type='negative') + @decorators.idempotent_id('1cb929e6-d375-4dcb-ab7c-73aa205af896') def test_delete_wf_with_trigger_associate_in_other_tenant(self): self.useFixture(lockutils.LockFixture('mistral-workflow')) tr_name = 'trigger' @@ -352,6 +375,7 @@ class WorkflowTestsV2(base.TestCase): self.alt_client.triggers.remove(tr_name) @test.attr(type='negative') + @decorators.idempotent_id('f575713b-27fd-4ec8-b84f-468a7adf5ed2') def test_delete_nonexistent_wf(self): self.assertRaises(exceptions.NotFound, self.client.delete_obj,