CLOUDSTACK-8269: Code changes in primary storage test cases as per recent change in product behavior
Signed-off-by: SrikanteswaraRao Talluri <tall...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/53bae008 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/53bae008 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/53bae008 Branch: refs/heads/hotfix/scp-exception Commit: 53bae00801235c104f73a56501ff417209154546 Parents: 0440960 Author: Gaurav Aradhye <gaurav.arad...@clogeny.com> Authored: Thu Feb 19 00:34:18 2015 -0800 Committer: SrikanteswaraRao Talluri <tall...@apache.org> Committed: Fri Feb 20 20:03:45 2015 +0530 ---------------------------------------------------------------------- .../component/test_ps_domain_limits.py | 24 +------------------- test/integration/component/test_ps_limits.py | 8 +------ 2 files changed, 2 insertions(+), 30 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/53bae008/test/integration/component/test_ps_domain_limits.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_ps_domain_limits.py b/test/integration/component/test_ps_domain_limits.py index d9c1018..d659a15 100644 --- a/test/integration/component/test_ps_domain_limits.py +++ b/test/integration/component/test_ps_domain_limits.py @@ -333,7 +333,7 @@ class TestMultipleChildDomain(cloudstackTestCase): self.assertTrue(isVmExpunged(self.apiclient, vm_2.id), "VM not expunged \ in allotted time") - expectedCount = 0 + expectedCount -= templatesize result = isDomainResourceCountEqualToExpectedCount( self.apiclient, self.parent_domain.id, expectedCount, RESOURCE_PRIMARY_STORAGE) @@ -419,14 +419,6 @@ class TestMultipleChildDomain(cloudstackTestCase): expectedCount, RESOURCE_PRIMARY_STORAGE) self.assertFalse(result[0], result[1]) self.assertTrue(result[2], "Resource count does not match") - - expectedCount -= volumeSize - vm.detach_volume(apiclient, volume=volume) - result = isDomainResourceCountEqualToExpectedCount( - self.apiclient, self.domain.id, - expectedCount, RESOURCE_PRIMARY_STORAGE) - self.assertFalse(result[0], result[1]) - self.assertTrue(result[2], "Resource count does not match") except Exception as e: self.fail("Failure: %s" % e) return @@ -540,14 +532,6 @@ class TestMultipleChildDomain(cloudstackTestCase): expectedCount, RESOURCE_PRIMARY_STORAGE) self.assertFalse(result[0], result[1]) self.assertTrue(result[2], "Resource count does not match") - - expectedCount -= volume2size - vm.detach_volume(apiclient, volume=volume_2) - result = isDomainResourceCountEqualToExpectedCount( - self.apiclient, self.domain.id, - expectedCount, RESOURCE_PRIMARY_STORAGE) - self.assertFalse(result[0], result[1]) - self.assertTrue(result[2], "Resource count does not match") except Exception as e: self.fail("Failure: %s" % e) return @@ -643,12 +627,6 @@ class TestMultipleChildDomain(cloudstackTestCase): expectedCount -= volumeSize vm.detach_volume(apiclient, volume) - result = isDomainResourceCountEqualToExpectedCount( - self.apiclient, self.domain.id, - expectedCount, RESOURCE_PRIMARY_STORAGE) - self.assertFalse(result[0], result[1]) - self.assertTrue(result[2], "Resource count does not match") - volume.delete(apiclient) result = isDomainResourceCountEqualToExpectedCount( self.apiclient, self.domain.id, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/53bae008/test/integration/component/test_ps_limits.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_ps_limits.py b/test/integration/component/test_ps_limits.py index c9a754b..1c815bf 100644 --- a/test/integration/component/test_ps_limits.py +++ b/test/integration/component/test_ps_limits.py @@ -433,7 +433,7 @@ class TestVolumeLimits(cloudstackTestCase): self.assertTrue(isVmExpunged(self.apiclient, self.virtualMachine_2.id), "VM not expunged \ in allotted time") - expectedCount = (self.initialResourceCount * 2) #Total 2 vms + expectedCount -= (self.template.size / (1024 ** 3)) response = matchResourceCount( self.apiclient, expectedCount, RESOURCE_PRIMARY_STORAGE, @@ -569,12 +569,6 @@ class TestVolumeLimits(cloudstackTestCase): except Exception as e: self.fail("Failure in detach volume operation: %s" % e) - response = matchResourceCount( - self.apiclient, expectedCount, - RESOURCE_PRIMARY_STORAGE, - accountid=self.account.id) - self.assertEqual(response[0], PASS, response[1]) - try: self.debug("deleting the volume: %s" % volume.name) volume.delete(apiclient)