Skip to content

Commit b824cb3

Browse files
Fix test_sharedfs_lifecycle.py (volume size check for powerflex)
1 parent e9e4238 commit b824cb3

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

test/integration/smoke/test_sharedfs_lifecycle.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
)
3939
from marvin.lib.common import (get_domain,
4040
get_zone,
41-
get_template)
41+
get_template,
42+
list_storage_pools)
4243
from marvin.codes import FAILED
4344

4445
from marvin.lib.decoratorGenerators import skipTestIf
@@ -258,20 +259,31 @@ def test_mount_shared_fs(self):
258259
def test_resize_shared_fs(self):
259260
"""Resize the shared filesystem by changing the disk offering and validate
260261
"""
262+
sharedfs_pool_response = list_storage_pools(self.apiclient, id=self.sharedfs.storageid)
263+
sharedfs_pool = sharedfs_pool_response[0]
264+
261265
self.mountSharedFSOnVM(self.vm1_ssh_client, self.sharedfs)
262266
result = self.vm1_ssh_client.execute("df -Th /mnt/fs1 | grep nfs")[0]
263267
self.debug(result)
264268
size = result.split()[-5]
265269
self.debug("Size of the filesystem is " + size)
266-
self.assertEqual(size, "2.0G", "SharedFS size should be 2.0G")
270+
if sharedfs_pool.type.lower() == "powerflex":
271+
self.assertEqual(size, "8.0G", "SharedFS size should be 8.0G")
272+
new_size = 9
273+
else:
274+
self.assertEqual(size, "2.0G", "SharedFS size should be 2.0G")
275+
new_size = 3
267276

268277
response = SharedFS.stop(self.sharedfs, self.apiclient)
269-
response = SharedFS.changediskoffering(self.sharedfs, self.apiclient, self.disk_offering.id, 3)
278+
response = SharedFS.changediskoffering(self.sharedfs, self.apiclient, self.disk_offering.id, new_size)
270279
self.debug(response)
271280
response = SharedFS.start(self.sharedfs, self.apiclient)
272281
time.sleep(10)
273282

274283
result = self.vm1_ssh_client.execute("df -Th /mnt/fs1 | grep nfs")[0]
275284
size = result.split()[-5]
276285
self.debug("Size of the filesystem is " + size)
277-
self.assertEqual(size, "3.0G", "SharedFS size should be 3.0G")
286+
if sharedfs_pool.type.lower() == "powerflex":
287+
self.assertEqual(size, "16G", "SharedFS size should be 16G")
288+
else:
289+
self.assertEqual(size, "3.0G", "SharedFS size should be 3.0G")

0 commit comments

Comments
 (0)