Codebase list cinder-tempest-plugin / 668ce74
Add command to fix/generate idempotent IDs This patch adds a "uuidgen" command that will fix all issues related to idempotent IDs in our tests. Also modifies pep8 to detect these issues. This command already exists in tempest and is required for cinder tempest plugin as we had undetected issues in our tests that got merged which are also fixed in this patch. The issues are as follows: 1) Missing idempotent IDs in test_capabilities 2) Duplicate idempotent IDs in the following backup tests a) test_backup_create_and_restore_to_an_existing_volume b) test_incr_backup_create_and_restore_to_an_existing_volume Change-Id: I6b34fd67af4c302ff17244143506d8c8a8247eb6 whoami-rajat 4 years ago
3 changed file(s) with 10 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
6666 self.assertEqual(src_vol['id'], restore['volume_id'])
6767 self.assertEqual(backup['id'], restore['backup_id'])
6868
69 @decorators.idempotent_id('b5d837b0-7066-455d-88fc-4a721a899306')
69 @decorators.idempotent_id('457359e2-a663-4758-8f76-06d392dfd7c7')
7070 def test_incr_backup_create_and_restore_to_an_existing_volume(self):
7171 """Test incr backup create and restore to an existing volume."""
7272 # Create volume
1111
1212 import abc
1313
14 from tempest.lib import decorators
1415 from tempest.lib import exceptions
1516
1617 from cinder_tempest_plugin.api.volume import base
5556
5657 credentials = ['project_admin', 'system_admin']
5758
59 @decorators.idempotent_id('1fdbe493-e58f-48bf-bb38-52003eeef8cb')
5860 def test_get_capabilities(self):
5961 pools = self.admin_stats_client.list_pools()['pools']
6062 host_name = pools[0]['name']
6668
6769 credentials = ['project_member', 'project_admin', 'system_admin']
6870
71 @decorators.idempotent_id('dbaf51de-fafa-4f55-875f-7537524489ab')
6972 def test_get_capabilities(self):
7073 pools = self.admin_stats_client.list_pools()['pools']
7174 host_name = pools[0]['name']
1919 commands = stestr run --slowest {posargs}
2020
2121 [testenv:pep8]
22 commands = flake8 {posargs}
22 commands =
23 flake8 {posargs}
24 check-uuid --package cinder_tempest_plugin
25
26 [testenv:uuidgen]
27 commands = check-uuid --fix --package cinder_tempest_plugin
2328
2429 [testenv:venv]
2530 commands = {posargs}