Merge pull request #994 from pritisarap12/snapshot-has-no-attribute-len

CLOUDSTACK-9001: Modifying snapshot results validation Currently snapshots results validation is based on length of snapshot result but if snapshot creation fails then None type object will not have "len" attribute hence modifying the validation.

* pr/994:
  CLOUDSTACK-9001: Modifying snapshot results validation in testpath_uuid_event testpath

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2016-01-17 13:40:30 +01:00
commit 329c012b79
1 changed files with 9 additions and 3 deletions

View File

@ -167,9 +167,15 @@ class TestVerifyEventsTable(cloudstackTestCase):
self.apiclient,
root_volume.id)
self.assertNotEqual(
len(snapshot),
0,
snapshots_list = Snapshot.list(self.userapiclient,
id=snapshot.id)
status = validateList(snapshots_list)
self.assertEqual(status[0], PASS, "Snapshots List Validation Failed")
self.assertEqual(
snapshot.state,
"BackedUp",
"Check if snapshot gets created properly"
)