mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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 <tsp@apache.org>
This commit is contained in:
parent
8ca5097752
commit
d875a36e5c
@ -747,20 +747,12 @@ class TestVMLifeCycle(cloudstackTestCase):
|
|||||||
self.services["mount"] = diskdevice
|
self.services["mount"] = diskdevice
|
||||||
break
|
break
|
||||||
else:
|
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"]
|
c = "mount |grep %s|head -1" % self.services["mount"]
|
||||||
res = ssh_client.execute(c)
|
res = ssh_client.execute(c)
|
||||||
self.debug("Found a mount point at %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))
|
||||||
# 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)
|
|
||||||
|
|
||||||
# Get ISO size
|
# Get ISO size
|
||||||
iso_response = list_isos(
|
iso_response = list_isos(
|
||||||
@ -772,13 +764,7 @@ class TestVMLifeCycle(cloudstackTestCase):
|
|||||||
True,
|
True,
|
||||||
"Check list response returns a valid list"
|
"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:
|
try:
|
||||||
#Unmount ISO
|
#Unmount ISO
|
||||||
command = "umount %s" % self.services["mount_dir"]
|
command = "umount %s" % self.services["mount_dir"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user