CLOUDSTACK-8269: Code changes in primary storage test cases as per recent change in product behavior

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
Gaurav Aradhye 2015-02-19 00:34:18 -08:00 committed by SrikanteswaraRao Talluri
parent 0440960933
commit 53bae00801
2 changed files with 2 additions and 30 deletions

View File

@ -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,

View File

@ -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)