diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index 0ae777e4ab9..988a1629715 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -744,7 +744,8 @@ class TestReleaseIP(cloudstackTestCase): ip_addrs = list_publicIP( self.apiclient, account=self.account.name, - domainid=self.account.domainid + domainid=self.account.domainid, + issourcenat=False ) try: self.ip_addr = ip_addrs[0] @@ -773,7 +774,7 @@ class TestReleaseIP(cloudstackTestCase): def tearDown(self): cleanup_resources(self.apiclient, self.cleanup) - @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false", BugId="CLOUDSTACK-6984") + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_releaseIP(self): """Test for release public IP address""" @@ -781,21 +782,22 @@ class TestReleaseIP(cloudstackTestCase): self.ip_address.delete(self.apiclient) - # Sleep to ensure that deleted state is reflected in other calls - time.sleep(self.services["sleep"]) + retriesCount = 10 + isIpAddressDisassociated = False - # ListPublicIpAddresses should not list deleted Public IP address - list_pub_ip_addr_resp = list_publicIP( + while retriesCount > 0: + listResponse = list_publicIP( self.apiclient, id=self.ip_addr.id - ) - self.debug("List Public IP response" + str(list_pub_ip_addr_resp)) + ) + if listResponse is None: + isIpAddressDisassociated = True + break + retriesCount -= 1 + time.sleep(60) + # End while - self.assertEqual( - list_pub_ip_addr_resp, - None, - "Check if disassociated IP Address is no longer available" - ) + self.assertTrue(isIpAddressDisassociated, "Failed to disassociate IP address") # ListPortForwardingRules should not list # associated rules with Public IP address diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py index 9ab7848e5ba..e34615736ad 100644 --- a/test/integration/smoke/test_vm_life_cycle.py +++ b/test/integration/smoke/test_vm_life_cycle.py @@ -304,7 +304,7 @@ class TestVMLifeCycle(cloudstackTestCase): return - @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false", BugId="CLOUDSTACK-6984") + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_01_stop_vm(self): """Test Stop Virtual Machine """ diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index d45b7cc2375..1ed8c7219a7 100644 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -592,7 +592,7 @@ class VirtualMachine: validationresult = validateList(vms) if validationresult[0] == FAIL: raise Exception("VM list validation failed: %s" % validationresult[2]) - elif str(vms[0].state).lower() == str(state).lower(): + elif str(vms[0].state).lower().decode("string_escape") == str(state).lower(): returnValue = [PASS, None] break except Exception as e: