mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8211: Correcting expected secondary storage count value by rounding off to floor value and including the physicalsize of snapshot
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
parent
c31e8e7409
commit
a4e9b4e8a4
|
|
@ -127,7 +127,7 @@ class TestSecondaryStorageLimits(cloudstackTestCase):
|
|||
except Exception as e:
|
||||
return [FAIL, e]
|
||||
return [PASS, None]
|
||||
|
||||
|
||||
@data(ROOT_DOMAIN_ADMIN, CHILD_DOMAIN_ADMIN)
|
||||
@attr(tags = ["advanced"], required_hardware="true")
|
||||
def test_01_register_template(self, value):
|
||||
|
|
@ -234,6 +234,8 @@ class TestSecondaryStorageLimits(cloudstackTestCase):
|
|||
self.assertEqual(response[0], PASS, response[1])
|
||||
snapshot = response[1]
|
||||
|
||||
snapshotSize = (snapshot.physicalsize / (1024 ** 3))
|
||||
|
||||
try:
|
||||
template = Template.create_from_snapshot(apiclient,
|
||||
snapshot=snapshot,
|
||||
|
|
@ -249,7 +251,9 @@ class TestSecondaryStorageLimits(cloudstackTestCase):
|
|||
"templates list validation failed")
|
||||
|
||||
templateSize = (templates[0].size / (1024**3))
|
||||
response = matchResourceCount(self.apiclient, templateSize,
|
||||
|
||||
expectedSecondaryStorageCount = int(templateSize + snapshotSize)
|
||||
response = matchResourceCount(self.apiclient, expectedSecondaryStorageCount,
|
||||
resourceType=RESOURCE_SECONDARY_STORAGE,
|
||||
accountid=self.account.id)
|
||||
self.assertEqual(response[0], PASS, response[1])
|
||||
|
|
|
|||
Loading…
Reference in New Issue