CLOUDSTACK-4257: Additional asserts for storage migration test

Test whether valid storage pools are listed and at least one pool is
available for migration.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit a82f66e0fa)
This commit is contained in:
Prasanna Santhanam 2013-08-20 17:24:05 +05:30
parent ed745d3489
commit 9ed5083f9b
1 changed files with 5 additions and 2 deletions

View File

@ -259,8 +259,11 @@ class TestStorageMotion(cloudstackTestCase):
self.apiclient,
id=volume.id
)
if not pools or pools is None:
self.skipTest("No suitable storage pools found for volume migration.Skipping")
if not pools:
self.skipTest("No suitable storage pools found for volume migration. Skipping")
self.assert_(isinstance(pools, list), "invalid pool response from listStoragePoolsForMigration: %s" %pools)
self.assert_(len(pools) > 0, "no valid storage pools found for migration")
pool = pools[0]
self.debug("Migrating Volume-ID: %s to Pool: %s" % (