From 11231d6b12770c98d32e533d94ec63183cc19eda Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Wed, 4 Dec 2013 11:29:50 +0530 Subject: [PATCH] CLOUDSTACK-5333: Code changes related to snapshots listing Signed-off-by: Girish Shilamkar --- .../component/test_project_limits.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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):