mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5333: Code changes related to snapshots listing
Signed-off-by: Girish Shilamkar <girish@clogeny.com>
This commit is contained in:
parent
27c2c125d8
commit
11231d6b12
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue