Merge "Add tempest tests for share snapshot metadata"
diff --git a/manila_tempest_tests/tests/api/admin/test_share_types.py b/manila_tempest_tests/tests/api/admin/test_share_types.py
index abdb4ba..d23171a 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_types.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_types.py
@@ -114,14 +114,14 @@
@decorators.idempotent_id('a9af19e1-e789-4c4f-a39b-dd8df6ed00b1')
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
@ddt.named_data(
- ('2.50_name_description_public', '2.50',
+ ('2_50_name_description_public', '2.50',
data_utils.rand_name("type_updated"), 'description_updated', True),
- ('2.50_name', '2.50', data_utils.rand_name("type_updated"), None,
+ ('2_50_name', '2.50', data_utils.rand_name("type_updated"), None,
None),
- ('2.50_description_public', '2.50', None, 'description_updated',
+ ('2_50_description_public', '2.50', None, 'description_updated',
None),
- ('2.50_public', '2.50', None, None, True),
- ('2.50', '2.50', None, None, False),
+ ('2_50_public', '2.50', None, None, True),
+ ('2_50', '2.50', None, None, False),
(f'{LATEST_MICROVERSION}_name_description_public',
LATEST_MICROVERSION, data_utils.rand_name("type_updated"),
'description_updated', True),
diff --git a/manila_tempest_tests/tests/api/test_share_types_negative.py b/manila_tempest_tests/tests/api/test_share_types_negative.py
index 3b930f9..af4815f 100644
--- a/manila_tempest_tests/tests/api/test_share_types_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_types_negative.py
@@ -84,12 +84,12 @@
@decorators.idempotent_id('4a22945c-8988-43a1-88c9-eb86e6abcd8e')
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
@ddt.named_data(
- ('2.50', '2.50', '', None, None),
+ ('2_50', '2.50', '', None, None),
(LATEST_MICROVERSION, LATEST_MICROVERSION, '', None, None),
- ('2.50_bad_public', '2.50', None, None, 'not_bool'),
+ ('2_50_bad_public', '2.50', None, None, 'not_bool'),
(f'{LATEST_MICROVERSION}_bad_public', LATEST_MICROVERSION, None, None,
'not_bool'),
- ('2.50_description', '2.50', None, generate_long_description(256),
+ ('2_50_description', '2.50', None, generate_long_description(256),
None),
(f'{LATEST_MICROVERSION}_description', LATEST_MICROVERSION, None,
generate_long_description(256), None),
diff --git a/manila_tempest_tests/tests/rbac/test_share_network.py b/manila_tempest_tests/tests/rbac/test_share_network.py
index c1ca6a2..3665b6b 100644
--- a/manila_tempest_tests/tests/rbac/test_share_network.py
+++ b/manila_tempest_tests/tests/rbac/test_share_network.py
@@ -35,6 +35,8 @@
super(ShareRbacShareNetworkTests, cls).setup_clients()
cls.persona = getattr(cls, 'os_%s' % cls.credentials[0])
cls.client = cls.persona.share_v2.SharesV2Client()
+ cls.alt_project_share_v2_client = (
+ cls.os_project_alt_member.share_v2.SharesV2Client())
@classmethod
def resource_setup(cls):
@@ -72,8 +74,6 @@
project_member = cls.setup_user_client(
cls.persona, project_id=cls.persona.credentials.project_id)
cls.share_member_client = project_member.share_v2.SharesV2Client()
- cls.alt_project_share_v2_client = (
- cls.os_project_alt_member.share_v2.SharesV2Client())
@decorators.idempotent_id('358dd850-cd81-4b81-aefa-3dfcb7aa4551')
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
@@ -148,12 +148,6 @@
credentials = ['project_member', 'project_alt_member']
- @classmethod
- def setup_clients(cls):
- super(ProjectMemberTests, cls).setup_clients()
- cls.alt_project_share_v2_client = (
- cls.os_project_alt_member.share_v2.SharesV2Client())
-
@decorators.idempotent_id('d051c749-3d1c-4485-86c5-6eb860b49cad')
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
def test_create_share_network(self):
diff --git a/manila_tempest_tests/tests/rbac/test_share_types.py b/manila_tempest_tests/tests/rbac/test_share_types.py
index bc75597..2263747 100644
--- a/manila_tempest_tests/tests/rbac/test_share_types.py
+++ b/manila_tempest_tests/tests/rbac/test_share_types.py
@@ -78,7 +78,7 @@
cls.share_member_client = project_member.share_v2.SharesV2Client()
@decorators.idempotent_id('b24bf137-352a-4ebd-b736-27518d32c1bd')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API)
def test_create_share_type(self):
share_type = self.do_request(
'create_share_type', expected_status=200,
diff --git a/manila_tempest_tests/tests/rbac/test_shares.py b/manila_tempest_tests/tests/rbac/test_shares.py
index c58a17e..50fa4ce 100644
--- a/manila_tempest_tests/tests/rbac/test_shares.py
+++ b/manila_tempest_tests/tests/rbac/test_shares.py
@@ -119,11 +119,9 @@
project_member = cls.setup_user_client(
cls.persona, project_id=cls.persona.credentials.project_id)
cls.share_member_client = project_member.share_v2.SharesV2Client()
- cls.alt_project_share_v2_client = (
- cls.os_project_alt_member.share_v2.SharesV2Client())
@decorators.idempotent_id('14a52454-cba0-4973-926a-28e924ae2e63')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_get_share(self):
share = self.create_share(
self.share_member_client, self.share_type['id'])
@@ -322,12 +320,6 @@
credentials = ['project_member', 'project_alt_member']
protocol = 'nfs'
- @classmethod
- def setup_clients(cls):
- super(TestProjectMemberTestsNFS, cls).setup_clients()
- cls.alt_project_share_v2_client = (
- cls.os_project_alt_member.share_v2.SharesV2Client())
-
@decorators.idempotent_id('75b9fd40-ae63-4caf-9c93-0fe24b2ce904')
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
def test_get_share(self):
diff --git a/manila_tempest_tests/tests/rbac/test_snapshots.py b/manila_tempest_tests/tests/rbac/test_snapshots.py
index a546fb0..beffc52 100644
--- a/manila_tempest_tests/tests/rbac/test_snapshots.py
+++ b/manila_tempest_tests/tests/rbac/test_snapshots.py
@@ -96,7 +96,7 @@
cls.alt_project_share_v2_client, share_type['id'])
@decorators.idempotent_id('e55b1a01-0fcb-42aa-8cc4-b041fc75f1e4')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_get_snapshot(self):
snapshot = self.create_snapshot(
self.share_member_client, self.share['id'])
@@ -110,7 +110,7 @@
snapshot_id=alt_snapshot['id'])
@decorators.idempotent_id('3b209017-f5ad-4daa-8932-582a75975bbe')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_list_snapshot(self):
snap = self.create_snapshot(
self.share_member_client, self.share['id'])
@@ -139,7 +139,7 @@
snapshot_id=snapshot['id'])
@decorators.idempotent_id('6de91ee0-d27e-409a-957b-75489d4e7291')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_delete_snapshot(self):
snap = self.create_snapshot(
self.share_member_client, self.share['id'])
@@ -155,7 +155,7 @@
self.client.wait_for_resource_deletion(snapshot_id=alt_snap['id'])
@decorators.idempotent_id('3ac10dfb-3445-4052-855a-a17056d16a9c')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_force_delete_snapshot(self):
snap = self.create_snapshot(
self.share_member_client, self.share['id'])
@@ -172,7 +172,7 @@
self.client.wait_for_resource_deletion(snapshot_id=alt_snap['id'])
@decorators.idempotent_id('513c8fef-9597-4e6c-a811-fb89b456d457')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_rename_snapshot(self):
snap = self.create_snapshot(
self.share_member_client, self.share['id'])
@@ -188,7 +188,7 @@
snapshot_id=alt_snap['id'], name=name)
@decorators.idempotent_id('a5e99bfb-8767-4680-9e39-bde767e4b8f8')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_reset_snapshot(self):
snap = self.create_snapshot(
self.share_member_client, self.share['id'])
@@ -232,7 +232,7 @@
snapshot_id=alt_snapshot['id'])
@decorators.idempotent_id('0dcc1f68-86e2-432e-ad50-51c3cb78b986')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_list_snapshot(self):
share_client = getattr(self, 'share_member_client', self.client)
snap = self.create_snapshot(share_client, self.share['id'])
@@ -355,7 +355,7 @@
super(TestProjectReaderTestsNFS, self).test_get_snapshot()
@decorators.idempotent_id('fef4285a-a489-4fec-97af-763c2e33282e')
- @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
+ @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_list_snapshot(self):
super(TestProjectReaderTestsNFS, self).test_list_snapshot()