Skip to content

Commit 7444bc6

Browse files
travis: fix test/integration/component/test_public_ip.py (apache#5486)
1 parent f50cc27 commit 7444bc6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/integration/component/test_public_ip.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def test_02_list_publicip_domain_admin(self):
376376
)
377377

378378
# Step 2. Associate IP in range dedicated to domain1
379-
ip_address_1 = self.get_free_ipaddress(self.public_ip_range1.vlan.id)
379+
ip_address_1 = self.get_free_ipaddress(self.public_ip_range1.vlan.id, self.account1.domainid, self.account1.name)
380380
ipaddress = PublicIPAddress.create(
381381
self.apiclient,
382382
zoneid=self.zone.id,
@@ -519,7 +519,7 @@ def test_03_list_publicip_user_domain(self):
519519
)
520520

521521
# Step 4: Associate IP in range dedicated to sub domain
522-
ip_address_1 = self.get_free_ipaddress(self.public_ip_range2.vlan.id)
522+
ip_address_1 = self.get_free_ipaddress(self.public_ip_range2.vlan.id, self.sub_account.domainid, self.sub_account.name)
523523
ipaddress = PublicIPAddress.create(
524524
sub_user_api_client,
525525
zoneid=self.zone.id,
@@ -729,7 +729,7 @@ def test_05_list_publicip_user_domain(self):
729729
)
730730

731731
# Acquire public ip address from VPC
732-
ip_address_1 = self.get_free_ipaddress(self.public_ip_range3.vlan.id)
732+
ip_address_1 = self.get_free_ipaddress(self.public_ip_range3.vlan.id, self.account2.domainid, self.account2.name)
733733
PublicIPAddress.create(
734734
user_api_client,
735735
zoneid=self.zone.id,
@@ -828,10 +828,12 @@ def test_06_list_publicip_user_domain(self):
828828
except Exception as e:
829829
self.info("Got exception as expected since domain2 cant access network of domain1")
830830

831-
def get_free_ipaddress(self, vlanId):
831+
def get_free_ipaddress(self, vlanId, domainId, account):
832832
ipaddresses = PublicIPAddress.list(
833833
self.apiclient,
834834
vlanid=vlanId,
835+
domainId=domainId,
836+
account=account,
835837
state='Free'
836838
)
837839
self.assertEqual(

0 commit comments

Comments
 (0)