Updated Branches: refs/heads/master 8ca509775 -> d875a36e5
CLOUDSTACK-3916: The size test is invalid ISO size can differ from the mounted packages within the ISO. Remove the size check and only perform attach and detach in the guest. Signed-off-by: Prasanna Santhanam <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d875a36e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d875a36e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d875a36e Branch: refs/heads/master Commit: d875a36e5c79df0f2aea57804dde22a00ba36f7e Parents: 8ca5097 Author: Prasanna Santhanam <[email protected]> Authored: Tue Jul 30 14:12:33 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Tue Jul 30 14:12:33 2013 +0530 ---------------------------------------------------------------------- test/integration/smoke/test_vm_life_cycle.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d875a36e/test/integration/smoke/test_vm_life_cycle.py ---------------------------------------------------------------------- diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py index 97245ad..1281422 100644 --- a/test/integration/smoke/test_vm_life_cycle.py +++ b/test/integration/smoke/test_vm_life_cycle.py @@ -747,20 +747,12 @@ class TestVMLifeCycle(cloudstackTestCase): self.services["mount"] = diskdevice break else: - self.skipTest("No mount points matched. Mount was unsuccessful") + self.fail("No mount points matched. Mount was unsuccessful") c = "mount |grep %s|head -1" % self.services["mount"] res = ssh_client.execute(c) - self.debug("Found a mount point at %s" % res) - - # Res may contain more than one strings depending on environment - # Split strings to form new list which is used for assertion on ISO size - result = [] - for i in res: - for k in i.split(): - result.append(k) - - self.debug("Size of the mounted iso in %s" % res) + size = ssh_client.execute("du %s | tail -1" % self.services["mount"]) + self.debug("Found a mount point at %s with size" % (res, size)) # Get ISO size iso_response = list_isos( @@ -772,13 +764,7 @@ class TestVMLifeCycle(cloudstackTestCase): True, "Check list response returns a valid list" ) - iso_size = iso_response[0].size - self.assertEqual( - str(iso_size) in result, - True, - "ISO size mismatch. reported size within guest %s" % str(iso_size) - ) try: #Unmount ISO command = "umount %s" % self.services["mount_dir"]
