diff --git a/test/integration/component/test_ss_limits.py b/test/integration/component/test_ss_limits.py index 8662cd5ff86..ec28ea2baad 100644 --- a/test/integration/component/test_ss_limits.py +++ b/test/integration/component/test_ss_limits.py @@ -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])