Updated Branches: refs/heads/4.2 42dd51562 -> 90c6fcf2a
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]> (cherry picked from commit d875a36e5c79df0f2aea57804dde22a00ba36f7e) Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/90c6fcf2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/90c6fcf2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/90c6fcf2 Branch: refs/heads/4.2 Commit: 90c6fcf2a923da90b17c4ca123513c06d352bd05 Parents: 42dd515 Author: Prasanna Santhanam <[email protected]> Authored: Tue Jul 30 14:12:33 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Tue Jul 30 14:13:47 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/90c6fcf2/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"]
