Browse Source

After run manila tempest the share network residue

After run manila tempest with multi-tenancy, there have
manila share network residue. This manila share network
should be deleted in clear resources.

Change-Id: Ifedc595f8c0c754355861f25f1b6af9353d644f8
Closes-Bug:#1754588
(cherry picked from commit 01c7feed86)
(cherry picked from commit 608a0450b2)
changes/12/611212/6
shuaili.wang 11 months ago
parent
commit
6e7d1e8d8b
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      manila_tempest_tests/tests/api/base.py

+ 13
- 0
manila_tempest_tests/tests/api/base.py View File

@@ -273,6 +273,12 @@ class BaseSharesTest(test.BaseTestCase):
273 273
                 cls.shares_v2_client, os.networks_client)
274 274
             cls.shares_client.share_network_id = share_network_id
275 275
             cls.shares_v2_client.share_network_id = share_network_id
276
+            resource = {
277
+                "type": "share_network",
278
+                "id": share_network_id,
279
+                "client": cls.shares_v2_client,
280
+            }
281
+            cls.class_resources.insert(0, resource)
276 282
 
277 283
     @classmethod
278 284
     def resource_setup(cls):
@@ -1059,6 +1065,13 @@ class BaseSharesMixedTest(BaseSharesTest):
1059 1065
             cls.alt_shares_client.share_network_id = alt_share_network_id
1060 1066
             cls.alt_shares_v2_client.share_network_id = alt_share_network_id
1061 1067
 
1068
+            resource = {
1069
+                "type": "share_network",
1070
+                "id": alt_share_network_id,
1071
+                "client": cls.alt_shares_v2_client,
1072
+            }
1073
+            cls.class_resources.insert(0, resource)
1074
+
1062 1075
     @classmethod
1063 1076
     def _create_share_type(cls, specs=None):
1064 1077
         name = data_utils.rand_name("unique_st_name")

Loading…
Cancel
Save