Skip to content

Commit d70ef2a

Browse files
author
Girish Shilamkar
committed
CLOUDSTACK-5925: Changes to regression tests as per new get_zone, get_pod etc definitions
1 parent 4a0e95c commit d70ef2a

85 files changed

Lines changed: 1304 additions & 1386 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/integration/component/maint/test_egress_rules_host_maintenance.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,13 @@ def tearDown(self):
100100

101101
@classmethod
102102
def setUpClass(cls):
103-
cls.services = Services().services
104-
cls.api_client = super(
105-
TestEgressAfterHostMaintenance,
106-
cls
107-
).getClsTestClient().getApiClient()
103+
cls.testClient = super(TestEgressAfterHostMaintenance, cls).getClsTestClient()
104+
cls.api_client = cls.testClient.getApiClient()
108105

106+
cls.services = Services().services
109107
# Get Zone, Domain and templates
110-
cls.domain = get_domain(cls.api_client, cls.services)
111-
cls.zone = get_zone(cls.api_client, cls.services)
108+
cls.domain = get_domain(cls.api_client)
109+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
112110
cls.services['mode'] = cls.zone.networktype
113111
cls.pod = get_pod(
114112
cls.api_client,

test/integration/component/maint/test_high_availability.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,24 +107,16 @@ class TestHighAvailability(cloudstackTestCase):
107107
@classmethod
108108
def setUpClass(cls):
109109

110-
cls.api_client = super(
111-
TestHighAvailability,
112-
cls
113-
).getClsTestClient().getApiClient()
110+
cls.testClient = super(TestHighAvailability, cls).getClsTestClient()
111+
cls.api_client = cls.testClient.getApiClient()
112+
114113
cls.services = Services().services
115114
# Get Zone, Domain and templates
116-
cls.domain = get_domain(
117-
cls.api_client,
118-
cls.services
119-
)
120-
cls.zone = get_zone(
121-
cls.api_client,
122-
cls.services
123-
)
115+
cls.domain = get_domain(cls.api_client)
116+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
124117
cls.pod = get_pod(
125118
cls.api_client,
126-
zoneid=cls.zone.id,
127-
services=cls.services
119+
zoneid=cls.zone.id
128120
)
129121
cls.template = get_template(
130122
cls.api_client,

test/integration/component/maint/test_host_high_availability.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,13 @@ class TestHostHighAvailability(cloudstackTestCase):
7676

7777
@classmethod
7878
def setUpClass(cls):
79-
cls.api_client = super(
80-
TestHostHighAvailability,
81-
cls
82-
).getClsTestClient().getApiClient()
79+
cls.testClient = super(TestHostHighAvailability, cls).getClsTestClient()
80+
cls.api_client = cls.testClient.getApiClient()
81+
8382
cls.services = Services().services
8483
# Get Zone, Domain and templates
85-
cls.domain = get_domain(
86-
cls.api_client,
87-
cls.services
88-
)
89-
cls.zone = get_zone(
90-
cls.api_client,
91-
cls.services
92-
)
84+
cls.domain = get_domain(cls.api_client)
85+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
9386

9487
cls.template = get_template(
9588
cls.api_client,

test/integration/component/maint/test_multiple_ip_ranges.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"""
1919
from marvin.cloudstackTestCase import *
2020
from marvin.cloudstackAPI import *
21-
from marvin.cloudstackException import cloudstackAPIException
21+
from marvin.cloudstackException import CloudstackAPIException
2222
from marvin.lib.utils import *
2323
from marvin.lib.base import *
2424
from marvin.lib.common import *
@@ -87,13 +87,15 @@ class TestMultipleIpRanges(cloudstackTestCase):
8787
"""
8888
@classmethod
8989
def setUpClass(cls):
90-
cls.api_client = super(TestMultipleIpRanges, cls).getClsTestClient().getApiClient()
91-
cls.dbclient = super(TestMultipleIpRanges, cls).getClsTestClient().getDbConnection()
90+
cls.testClient = super(TestEgressAfterHostMaintenance, cls).getClsTestClient()
91+
cls.api_client = cls.testClient.getApiClient()
92+
cls.dbclient = cls.testClient.getDbConnection()
93+
9294
cls.services = Services().services
9395
# Get Zone, Domain and templates
94-
cls.domain = get_domain(cls.api_client, cls.services)
95-
cls.zone = get_zone(cls.api_client, cls.services)
96-
cls.pod = get_pod(cls.api_client, cls.zone.id, cls.services)
96+
cls.domain = get_domain(cls.api_client)
97+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
98+
cls.pod = get_pod(cls.api_client, cls.zone.id)
9799
cls.services['mode'] = cls.zone.networktype
98100
cls.services["domainid"] = cls.domain.id
99101
cls.services["zoneid"] = cls.zone.id

test/integration/component/maint/test_redundant_router.py

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,13 @@ class TestCreateRvRNetworkOffering(cloudstackTestCase):
137137

138138
@classmethod
139139
def setUpClass(cls):
140-
cls.api_client = super(
141-
TestCreateRvRNetworkOffering,
142-
cls
143-
).getClsTestClient().getApiClient()
140+
cls.testClient = super(TestCreateRvRNetworkOffering, cls).getClsTestClient()
141+
cls.api_client = cls.testClient.getApiClient()
142+
144143
cls.services = Services().services
145144
# Get Zone, Domain and templates
146-
cls.domain = get_domain(cls.api_client, cls.services)
147-
cls.zone = get_zone(cls.api_client, cls.services)
145+
cls.domain = get_domain(cls.api_client)
146+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
148147
cls._cleanup = []
149148
return
150149

@@ -231,14 +230,13 @@ class TestCreateRvRNetwork(cloudstackTestCase):
231230

232231
@classmethod
233232
def setUpClass(cls):
234-
cls.api_client = super(
235-
TestCreateRvRNetwork,
236-
cls
237-
).getClsTestClient().getApiClient()
233+
cls.testClient = super(TestCreateRvRNetwork, cls).getClsTestClient()
234+
cls.api_client = cls.testClient.getApiClient()
235+
238236
cls.services = Services().services
239237
# Get Zone, Domain and templates
240-
cls.domain = get_domain(cls.api_client, cls.services)
241-
cls.zone = get_zone(cls.api_client, cls.services)
238+
cls.domain = get_domain(cls.api_client)
239+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
242240
cls.template = get_template(
243241
cls.api_client,
244242
cls.zone.id,
@@ -433,14 +431,13 @@ class TestCreateRvRNetworkNonDefaultGuestCidr(cloudstackTestCase):
433431

434432
@classmethod
435433
def setUpClass(cls):
436-
cls.api_client = super(
437-
TestCreateRvRNetworkNonDefaultGuestCidr,
438-
cls
439-
).getClsTestClient().getApiClient()
434+
cls.testClient = super(TestCreateRvRNetworkNonDefaultGuestCidr, cls).getClsTestClient()
435+
cls.api_client = cls.testClient.getApiClient()
436+
440437
cls.services = Services().services
441438
# Get Zone, Domain and templates
442-
cls.domain = get_domain(cls.api_client, cls.services)
443-
cls.zone = get_zone(cls.api_client, cls.services)
439+
cls.domain = get_domain(cls.api_client)
440+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
444441
cls.template = get_template(
445442
cls.api_client,
446443
cls.zone.id,
@@ -642,14 +639,13 @@ class TestRVRInternals(cloudstackTestCase):
642639

643640
@classmethod
644641
def setUpClass(cls):
645-
cls.api_client = super(
646-
TestRVRInternals,
647-
cls
648-
).getClsTestClient().getApiClient()
642+
cls.testClient = super(TestRVRInternals, cls).getClsTestClient()
643+
cls.api_client = cls.testClient.getApiClient()
644+
649645
cls.services = Services().services
650646
# Get Zone, Domain and templates
651-
cls.domain = get_domain(cls.api_client, cls.services)
652-
cls.zone = get_zone(cls.api_client, cls.services)
647+
cls.domain = get_domain(cls.api_client)
648+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
653649
cls.template = get_template(
654650
cls.api_client,
655651
cls.zone.id,
@@ -946,14 +942,13 @@ class TestRvRRedundancy(cloudstackTestCase):
946942

947943
@classmethod
948944
def setUpClass(cls):
949-
cls.api_client = super(
950-
TestRvRRedundancy,
951-
cls
952-
).getClsTestClient().getApiClient()
945+
cls.testClient = super(TestRvRRedundancy, cls).getClsTestClient()
946+
cls.api_client = cls.testClient.getApiClient()
947+
953948
cls.services = Services().services
954949
# Get Zone, Domain and templates
955-
cls.domain = get_domain(cls.api_client, cls.services)
956-
cls.zone = get_zone(cls.api_client, cls.services)
950+
cls.domain = get_domain(cls.api_client)
951+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
957952
cls.template = get_template(
958953
cls.api_client,
959954
cls.zone.id,

test/integration/component/maint/test_redundant_router_deployment_planning.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,13 @@ class TestRvRDeploymentPlanning(cloudstackTestCase):
136136

137137
@classmethod
138138
def setUpClass(cls):
139-
cls.api_client = super(
140-
TestRvRDeploymentPlanning,
141-
cls
142-
).getClsTestClient().getApiClient()
139+
cls.testClient = super(TestRvRDeploymentPlanning, cls).getClsTestClient()
140+
cls.api_client = cls.testClient.getApiClient()
141+
143142
cls.services = Services().services
144143
# Get Zone, Domain and templates
145-
cls.domain = get_domain(cls.api_client, cls.services)
146-
cls.zone = get_zone(cls.api_client, cls.services)
144+
cls.domain = get_domain(cls.api_client)
145+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
147146
cls.template = get_template(
148147
cls.api_client,
149148
cls.zone.id,

test/integration/component/maint/test_redundant_router_network_rules.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,13 @@ class TestRedundantRouterRulesLifeCycle(cloudstackTestCase):
137137

138138
@classmethod
139139
def setUpClass(cls):
140-
cls.api_client = super(
141-
TestRedundantRouterRulesLifeCycle,
142-
cls
143-
).getClsTestClient().getApiClient()
140+
cls.testClient = super(TestRedundantRouterRulesLifeCycle, cls).getClsTestClient()
141+
cls.api_client = cls.testClient.getApiClient()
142+
144143
cls.services = Services().services
145144
# Get Zone, Domain and templates
146-
cls.domain = get_domain(cls.api_client, cls.services)
147-
cls.zone = get_zone(cls.api_client, cls.services)
145+
cls.domain = get_domain(cls.api_client)
146+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
148147
cls.template = get_template(
149148
cls.api_client,
150149
cls.zone.id,

test/integration/component/maint/test_vpc_host_maintenance.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
from marvin.lib.utils import *
2626
from marvin.lib.base import *
2727
from marvin.lib.common import *
28-
from marvin.sshClient import SshClient
29-
import datetime
3028

3129

3230
class Services:
@@ -190,14 +188,13 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
190188

191189
@classmethod
192190
def setUpClass(cls):
193-
cls.api_client = super(
194-
TestVMLifeCycleHostmaintenance,
195-
cls
196-
).getClsTestClient().getApiClient()
191+
cls.testClient = super(TestVMLifeCycleHostmaintenance, cls).getClsTestClient()
192+
cls.api_client = cls.testClient.getApiClient()
193+
197194
cls.services = Services().services
198195
# Get Zone, Domain and templates
199-
cls.domain = get_domain(cls.api_client, cls.services)
200-
cls.zone = get_zone(cls.api_client, cls.services)
196+
cls.domain = get_domain(cls.api_client)
197+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
201198
cls.template = get_template(
202199
cls.api_client,
203200
cls.zone.id,
@@ -554,4 +551,4 @@ def test_03_reconnect_host(self):
554551
"Router state should be running"
555552
)
556553
# TODO: Check for the network connectivity
557-
return
554+
return

test/integration/component/maint/test_vpc_on_host_maintenance.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,13 @@ class TestVPCHostMaintenance(cloudstackTestCase):
7777

7878
@classmethod
7979
def setUpClass(cls):
80-
cls.api_client = super(
81-
TestVPCHostMaintenance,
82-
cls
83-
).getClsTestClient().getApiClient()
80+
cls.testClient = super(TestVPCHostMaintenance, cls).getClsTestClient()
81+
cls.api_client = cls.testClient.getApiClient()
82+
8483
cls.services = Services().services
8584
# Get Zone, Domain and templates
86-
cls.domain = get_domain(cls.api_client, cls.services)
87-
cls.zone = get_zone(cls.api_client, cls.services)
85+
cls.domain = get_domain(cls.api_client)
86+
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
8887
cls.template = get_template(
8988
cls.api_client,
9089
cls.zone.id,

0 commit comments

Comments
 (0)