From 9ed5083f9bd9eb668ea152635c98e1598c38f7c2 Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Tue, 20 Aug 2013 17:24:05 +0530 Subject: [PATCH] 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 (cherry picked from commit a82f66e0fa8c9e20b0468aae82871c46a9f8b67e) --- test/integration/component/test_storage_motion.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/component/test_storage_motion.py b/test/integration/component/test_storage_motion.py index 8ddbebe6374..36376f373bc 100644 --- a/test/integration/component/test_storage_motion.py +++ b/test/integration/component/test_storage_motion.py @@ -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" % (