CLOUDSTACK-5333: Code changes related to snapshots listing

Signed-off-by: Girish Shilamkar <girish@clogeny.com>
This commit is contained in:
Gaurav Aradhye 2013-12-04 11:29:50 +05:30 committed by Girish Shilamkar
parent 27c2c125d8
commit 11231d6b12
1 changed files with 9 additions and 9 deletions

View File

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