diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py index c497311c94a..7cb29b7d279 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -24,6 +24,7 @@ from marvin.cloudstackAPI import * from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * +from marvin.codes import PASS import datetime @@ -781,15 +782,14 @@ class TestResourceLimitsProject(cloudstackTestCase): projectid=self.project.id ) self.cleanup.append(snapshot_1) - # Verify Snapshot state - self.assertEqual( - snapshot_1.state in [ - 'BackedUp', - 'CreatedOnPrimary' - ], - True, - "Check Snapshot state is Running or not" - ) + + #list snapshots + snapshots = list_snapshots(self.apiclient, projectid=self.project.id) + + self.debug("snapshots list: %s" % snapshots) + + self.assertEqual(validateList(snapshots)[0], PASS, "Snapshots list validation failed") + self.assertEqual(len(snapshots), 1, "Snapshots list should have exactly one entity") # Exception should be raised for second snapshot with self.assertRaises(Exception):