Browse Source

Merge "Do not create network resources for API tests"

tags/0.5.0
Zuul 1 year ago
parent
commit
8a3b02adbd

+ 6
- 0
designate_tempest_plugin/tests/api/admin/test_quotas.py View File

@@ -36,6 +36,12 @@ class QuotasAdminTest(BaseQuotasTest):
36 36
 
37 37
     credentials = ["admin"]
38 38
 
39
+    @classmethod
40
+    def setup_credentials(cls):
41
+        # Do not create network resources for these test.
42
+        cls.set_network_resources()
43
+        super(QuotasAdminTest, cls).setup_credentials()
44
+
39 45
     @classmethod
40 46
     def setup_clients(cls):
41 47
         super(QuotasAdminTest, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v1/test_domains.py View File

@@ -23,6 +23,12 @@ from designate_tempest_plugin.tests import base
23 23
 
24 24
 
25 25
 class DnsDomainsTest(base.BaseDnsV1Test):
26
+    @classmethod
27
+    def setup_credentials(cls):
28
+        # Do not create network resources for these test.
29
+        cls.set_network_resources()
30
+        super(DnsDomainsTest, cls).setup_credentials()
31
+
26 32
     @classmethod
27 33
     def setup_clients(cls):
28 34
         super(DnsDomainsTest, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v1/test_records.py View File

@@ -22,6 +22,12 @@ from designate_tempest_plugin.tests import base
22 22
 
23 23
 
24 24
 class RecordsTest(base.BaseDnsV1Test):
25
+    @classmethod
26
+    def setup_credentials(cls):
27
+        # Do not create network resources for these test.
28
+        cls.set_network_resources()
29
+        super(RecordsTest, cls).setup_credentials()
30
+
25 31
     @classmethod
26 32
     def setup_clients(cls):
27 33
         super(RecordsTest, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v1/test_servers.py View File

@@ -32,6 +32,12 @@ class ServersAdminTest(base.BaseDnsV1Test):
32 32
     """
33 33
     credentials = ['admin']
34 34
 
35
+    @classmethod
36
+    def setup_credentials(cls):
37
+        # Do not create network resources for these test.
38
+        cls.set_network_resources()
39
+        super(ServersAdminTest, cls).setup_credentials()
40
+
35 41
     @classmethod
36 42
     def setup_clients(cls):
37 43
         super(ServersAdminTest, cls).setup_clients()

+ 18
- 0
designate_tempest_plugin/tests/api/v2/test_blacklists.py View File

@@ -30,6 +30,12 @@ class BlacklistsAdminTest(BaseBlacklistsTest):
30 30
 
31 31
     credentials = ["admin"]
32 32
 
33
+    @classmethod
34
+    def setup_credentials(cls):
35
+        # Do not create network resources for these test.
36
+        cls.set_network_resources()
37
+        super(BlacklistsAdminTest, cls).setup_credentials()
38
+
33 39
     @classmethod
34 40
     def setup_clients(cls):
35 41
         super(BlacklistsAdminTest, cls).setup_clients()
@@ -108,6 +114,12 @@ class TestBlacklistNotFoundAdmin(BaseBlacklistsTest):
108 114
 
109 115
     credentials = ["admin"]
110 116
 
117
+    @classmethod
118
+    def setup_credentials(cls):
119
+        # Do not create network resources for these test.
120
+        cls.set_network_resources()
121
+        super(TestBlacklistNotFoundAdmin, cls).setup_credentials()
122
+
111 123
     @classmethod
112 124
     def setup_clients(cls):
113 125
         super(TestBlacklistNotFoundAdmin, cls).setup_clients()
@@ -145,6 +157,12 @@ class TestBlacklistInvalidIdAdmin(BaseBlacklistsTest):
145 157
 
146 158
     credentials = ["admin"]
147 159
 
160
+    @classmethod
161
+    def setup_credentials(cls):
162
+        # Do not create network resources for these test.
163
+        cls.set_network_resources()
164
+        super(TestBlacklistInvalidIdAdmin, cls).setup_credentials()
165
+
148 166
     @classmethod
149 167
     def setup_clients(cls):
150 168
         super(TestBlacklistInvalidIdAdmin, cls).setup_clients()

+ 18
- 0
designate_tempest_plugin/tests/api/v2/test_pool.py View File

@@ -36,6 +36,12 @@ class BasePoolTest(base.BaseDnsV2Test):
36 36
 class PoolAdminTest(BasePoolTest):
37 37
     credentials = ['admin']
38 38
 
39
+    @classmethod
40
+    def setup_credentials(cls):
41
+        # Do not create network resources for these test.
42
+        cls.set_network_resources()
43
+        super(PoolAdminTest, cls).setup_credentials()
44
+
39 45
     @classmethod
40 46
     def setup_clients(cls):
41 47
         super(PoolAdminTest, cls).setup_clients()
@@ -121,6 +127,12 @@ class TestPoolNotFoundAdmin(BasePoolTest):
121 127
 
122 128
     credentials = ["admin"]
123 129
 
130
+    @classmethod
131
+    def setup_credentials(cls):
132
+        # Do not create network resources for these test.
133
+        cls.set_network_resources()
134
+        super(TestPoolNotFoundAdmin, cls).setup_credentials()
135
+
124 136
     @classmethod
125 137
     def setup_clients(cls):
126 138
         super(TestPoolNotFoundAdmin, cls).setup_clients()
@@ -158,6 +170,12 @@ class TestPoolInvalidIdAdmin(BasePoolTest):
158 170
 
159 171
     credentials = ["admin"]
160 172
 
173
+    @classmethod
174
+    def setup_credentials(cls):
175
+        # Do not create network resources for these test.
176
+        cls.set_network_resources()
177
+        super(TestPoolInvalidIdAdmin, cls).setup_credentials()
178
+
161 179
     @classmethod
162 180
     def setup_clients(cls):
163 181
         super(TestPoolInvalidIdAdmin, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v2/test_quotas.py View File

@@ -28,6 +28,12 @@ class QuotasV2Test(base.BaseDnsV2Test):
28 28
 
29 29
     credentials = ['primary', 'admin']
30 30
 
31
+    @classmethod
32
+    def setup_credentials(cls):
33
+        # Do not create network resources for these test.
34
+        cls.set_network_resources()
35
+        super(QuotasV2Test, cls).setup_credentials()
36
+
31 37
     @classmethod
32 38
     def skip_checks(cls):
33 39
         super(QuotasV2Test, cls).skip_checks()

+ 23
- 0
designate_tempest_plugin/tests/api/v2/test_recordset.py View File

@@ -48,6 +48,12 @@ class BaseRecordsetsTest(base.BaseDnsV2Test):
48 48
 
49 49
 @ddt.ddt
50 50
 class RecordsetsTest(BaseRecordsetsTest):
51
+    @classmethod
52
+    def setup_credentials(cls):
53
+        # Do not create network resources for these test.
54
+        cls.set_network_resources()
55
+        super(RecordsetsTest, cls).setup_credentials()
56
+
51 57
     @classmethod
52 58
     def setup_clients(cls):
53 59
         super(RecordsetsTest, cls).setup_clients()
@@ -201,6 +207,12 @@ class RecordsetsTest(BaseRecordsetsTest):
201 207
 
202 208
 @ddt.ddt
203 209
 class RecordsetsNegativeTest(BaseRecordsetsTest):
210
+    @classmethod
211
+    def setup_credentials(cls):
212
+        # Do not create network resources for these test.
213
+        cls.set_network_resources()
214
+        super(RecordsetsNegativeTest, cls).setup_credentials()
215
+
204 216
     @classmethod
205 217
     def setup_clients(cls):
206 218
         super(RecordsetsNegativeTest, cls).setup_clients()
@@ -300,6 +312,11 @@ class RecordsetsNegativeTest(BaseRecordsetsTest):
300 312
 
301 313
 
302 314
 class RootRecordsetsTests(BaseRecordsetsTest):
315
+    @classmethod
316
+    def setup_credentials(cls):
317
+        # Do not create network resources for these test.
318
+        cls.set_network_resources()
319
+        super(RootRecordsetsTests, cls).setup_credentials()
303 320
 
304 321
     @classmethod
305 322
     def setup_clients(cls):
@@ -393,6 +410,12 @@ class RecordsetOwnershipTest(BaseRecordsetsTest):
393 410
 
394 411
     credentials = ['primary', 'alt']
395 412
 
413
+    @classmethod
414
+    def setup_credentials(cls):
415
+        # Do not create network resources for these test.
416
+        cls.set_network_resources()
417
+        super(RecordsetOwnershipTest, cls).setup_credentials()
418
+
396 419
     @classmethod
397 420
     def setup_clients(cls):
398 421
         super(RecordsetOwnershipTest, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v2/test_recordset_validation.py View File

@@ -41,6 +41,12 @@ class RecordsetValidationTest(base.BaseDnsV2Test):
41 41
         super(RecordsetValidationTest, self).setUp()
42 42
         self._zone = None
43 43
 
44
+    @classmethod
45
+    def setup_credentials(cls):
46
+        # Do not create network resources for these test.
47
+        cls.set_network_resources()
48
+        super(RecordsetValidationTest, cls).setup_credentials()
49
+
44 50
     @classmethod
45 51
     def setup_clients(cls):
46 52
         super(RecordsetValidationTest, cls).setup_clients()

+ 18
- 0
designate_tempest_plugin/tests/api/v2/test_tld.py View File

@@ -29,6 +29,12 @@ class BaseTldTest(base.BaseDnsV2Test):
29 29
 class TldAdminTest(BaseTldTest):
30 30
     credentials = ['admin']
31 31
 
32
+    @classmethod
33
+    def setup_credentials(cls):
34
+        # Do not create network resources for these test.
35
+        cls.set_network_resources()
36
+        super(TldAdminTest, cls).setup_credentials()
37
+
32 38
     @classmethod
33 39
     def setup_clients(cls):
34 40
         super(TldAdminTest, cls).setup_clients()
@@ -119,6 +125,12 @@ class TestTldNotFoundAdmin(BaseTldTest):
119 125
 
120 126
     credentials = ["admin"]
121 127
 
128
+    @classmethod
129
+    def setup_credentials(cls):
130
+        # Do not create network resources for these test.
131
+        cls.set_network_resources()
132
+        super(TestTldNotFoundAdmin, cls).setup_credentials()
133
+
122 134
     @classmethod
123 135
     def setup_clients(cls):
124 136
         super(TestTldNotFoundAdmin, cls).setup_clients()
@@ -156,6 +168,12 @@ class TestTldInvalidIdAdmin(BaseTldTest):
156 168
 
157 169
     credentials = ["admin"]
158 170
 
171
+    @classmethod
172
+    def setup_credentials(cls):
173
+        # Do not create network resources for these test.
174
+        cls.set_network_resources()
175
+        super(TestTldInvalidIdAdmin, cls).setup_credentials()
176
+
159 177
     @classmethod
160 178
     def setup_clients(cls):
161 179
         super(TestTldInvalidIdAdmin, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v2/test_transfer_accepts.py View File

@@ -25,6 +25,12 @@ class BaseTransferAcceptTest(base.BaseDnsV2Test):
25 25
 
26 26
 
27 27
 class TransferAcceptTest(BaseTransferAcceptTest):
28
+    @classmethod
29
+    def setup_credentials(cls):
30
+        # Do not create network resources for these test.
31
+        cls.set_network_resources()
32
+        super(TransferAcceptTest, cls).setup_credentials()
33
+
28 34
     @classmethod
29 35
     def setup_clients(cls):
30 36
         super(TransferAcceptTest, cls).setup_clients()

+ 18
- 0
designate_tempest_plugin/tests/api/v2/test_transfer_request.py View File

@@ -29,6 +29,12 @@ class BaseTransferRequestTest(base.BaseDnsV2Test):
29 29
 class TransferRequestTest(BaseTransferRequestTest):
30 30
     credentials = ['primary', 'alt']
31 31
 
32
+    @classmethod
33
+    def setup_credentials(cls):
34
+        # Do not create network resources for these test.
35
+        cls.set_network_resources()
36
+        super(TransferRequestTest, cls).setup_credentials()
37
+
32 38
     @classmethod
33 39
     def setup_clients(cls):
34 40
         super(TransferRequestTest, cls).setup_clients()
@@ -191,6 +197,12 @@ class TransferRequestTest(BaseTransferRequestTest):
191 197
 
192 198
 class TestTransferRequestNotFound(BaseTransferRequestTest):
193 199
 
200
+    @classmethod
201
+    def setup_credentials(cls):
202
+        # Do not create network resources for these test.
203
+        cls.set_network_resources()
204
+        super(TestTransferRequestNotFound, cls).setup_credentials()
205
+
194 206
     @classmethod
195 207
     def setup_clients(cls):
196 208
         super(TestTransferRequestNotFound, cls).setup_clients()
@@ -227,6 +239,12 @@ class TestTransferRequestNotFound(BaseTransferRequestTest):
227 239
 
228 240
 class TestTransferRequestInvalidId(BaseTransferRequestTest):
229 241
 
242
+    @classmethod
243
+    def setup_credentials(cls):
244
+        # Do not create network resources for these test.
245
+        cls.set_network_resources()
246
+        super(TestTransferRequestInvalidId, cls).setup_credentials()
247
+
230 248
     @classmethod
231 249
     def setup_clients(cls):
232 250
         super(TestTransferRequestInvalidId, cls).setup_clients()

+ 18
- 0
designate_tempest_plugin/tests/api/v2/test_tsigkey.py View File

@@ -29,6 +29,12 @@ class BaseTsigkeyTest(base.BaseDnsV2Test):
29 29
 class TsigkeyAdminTest(BaseTsigkeyTest):
30 30
     credentials = ['primary', 'admin']
31 31
 
32
+    @classmethod
33
+    def setup_credentials(cls):
34
+        # Do not create network resources for these test.
35
+        cls.set_network_resources()
36
+        super(TsigkeyAdminTest, cls).setup_credentials()
37
+
32 38
     @classmethod
33 39
     def setup_clients(cls):
34 40
         super(TsigkeyAdminTest, cls).setup_clients()
@@ -136,6 +142,12 @@ class TestTsigkeyNotFoundAdmin(BaseTsigkeyTest):
136 142
 
137 143
     credentials = ["admin"]
138 144
 
145
+    @classmethod
146
+    def setup_credentials(cls):
147
+        # Do not create network resources for these test.
148
+        cls.set_network_resources()
149
+        super(TestTsigkeyNotFoundAdmin, cls).setup_credentials()
150
+
139 151
     @classmethod
140 152
     def setup_clients(cls):
141 153
         super(TestTsigkeyNotFoundAdmin, cls).setup_clients()
@@ -173,6 +185,12 @@ class TestTsigkeyInvalidIdAdmin(BaseTsigkeyTest):
173 185
 
174 186
     credentials = ["admin"]
175 187
 
188
+    @classmethod
189
+    def setup_credentials(cls):
190
+        # Do not create network resources for these test.
191
+        cls.set_network_resources()
192
+        super(TestTsigkeyInvalidIdAdmin, cls).setup_credentials()
193
+
176 194
     @classmethod
177 195
     def setup_clients(cls):
178 196
         super(TestTsigkeyInvalidIdAdmin, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v2/test_unauthed.py View File

@@ -28,6 +28,12 @@ class TestDnsUnauthed(base.BaseDnsV2Test):
28 28
     client_manager = clients.ManagerV2Unauthed
29 29
     credentials = ["primary"]
30 30
 
31
+    @classmethod
32
+    def setup_credentials(cls):
33
+        # Do not create network resources for these test.
34
+        cls.set_network_resources()
35
+        super(TestDnsUnauthed, cls).setup_credentials()
36
+
31 37
     @classmethod
32 38
     def setup_clients(cls):
33 39
         super(TestDnsUnauthed, cls).setup_clients()

+ 18
- 0
designate_tempest_plugin/tests/api/v2/test_zones.py View File

@@ -28,6 +28,12 @@ class BaseZonesTest(base.BaseDnsV2Test):
28 28
 
29 29
 
30 30
 class ZonesTest(BaseZonesTest):
31
+    @classmethod
32
+    def setup_credentials(cls):
33
+        # Do not create network resources for these test.
34
+        cls.set_network_resources()
35
+        super(ZonesTest, cls).setup_credentials()
36
+
31 37
     @classmethod
32 38
     def setup_clients(cls):
33 39
         super(ZonesTest, cls).setup_clients()
@@ -115,6 +121,12 @@ class ZonesTest(BaseZonesTest):
115 121
 class ZonesAdminTest(BaseZonesTest):
116 122
     credentials = ['primary', 'admin']
117 123
 
124
+    @classmethod
125
+    def setup_credentials(cls):
126
+        # Do not create network resources for these test.
127
+        cls.set_network_resources()
128
+        super(ZonesAdminTest, cls).setup_credentials()
129
+
118 130
     @classmethod
119 131
     def setup_clients(cls):
120 132
         super(ZonesAdminTest, cls).setup_clients()
@@ -139,6 +151,12 @@ class ZonesAdminTest(BaseZonesTest):
139 151
 class ZoneOwnershipTest(BaseZonesTest):
140 152
     credentials = ['primary', 'alt']
141 153
 
154
+    @classmethod
155
+    def setup_credentials(cls):
156
+        # Do not create network resources for these test.
157
+        cls.set_network_resources()
158
+        super(ZoneOwnershipTest, cls).setup_credentials()
159
+
142 160
     @classmethod
143 161
     def setup_clients(cls):
144 162
         super(ZoneOwnershipTest, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v2/test_zones_exports.py View File

@@ -27,6 +27,12 @@ class BaseZoneExportsTest(base.BaseDnsV2Test):
27 27
 
28 28
 
29 29
 class ZonesExportTest(BaseZoneExportsTest):
30
+    @classmethod
31
+    def setup_credentials(cls):
32
+        # Do not create network resources for these test.
33
+        cls.set_network_resources()
34
+        super(ZonesExportTest, cls).setup_credentials()
35
+
30 36
     @classmethod
31 37
     def setup_clients(cls):
32 38
         super(ZonesExportTest, cls).setup_clients()

+ 6
- 0
designate_tempest_plugin/tests/api/v2/test_zones_imports.py View File

@@ -27,6 +27,12 @@ class BaseZonesImportTest(base.BaseDnsV2Test):
27 27
 
28 28
 
29 29
 class ZonesImportTest(BaseZonesImportTest):
30
+    @classmethod
31
+    def setup_credentials(cls):
32
+        # Do not create network resources for these test.
33
+        cls.set_network_resources()
34
+        super(ZonesImportTest, cls).setup_credentials()
35
+
30 36
     @classmethod
31 37
     def setup_clients(cls):
32 38
         super(ZonesImportTest, cls).setup_clients()

+ 0
- 6
designate_tempest_plugin/tests/base.py View File

@@ -75,12 +75,6 @@ class BaseDnsTest(test.BaseTestCase):
75 75
                         % cls.__name__)
76 76
             raise cls.skipException(skip_msg)
77 77
 
78
-    @classmethod
79
-    def setup_credentials(cls):
80
-        # Do not create network resources for these test.
81
-        cls.set_network_resources()
82
-        super(BaseDnsTest, cls).setup_credentials()
83
-
84 78
     def assertExpected(self, expected, actual, excluded_keys):
85 79
         for key, value in six.iteritems(expected):
86 80
             if key not in excluded_keys:

Loading…
Cancel
Save