summaryrefslogtreecommitdiffstats
path: root/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/nfs_ganesha/test_ganesha_add_brick.py')
-rw-r--r--tests/functional/nfs_ganesha/test_ganesha_add_brick.py24
1 files changed, 5 insertions, 19 deletions
diff --git a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
index 20252359f..e3fc6adc9 100644
--- a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
+++ b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2018-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,12 +14,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
-
from glusto.core import Glusto as g
-from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
-from glustolibs.gluster.gluster_base_class import runs_on
+from glustolibs.gluster.gluster_base_class import runs_on, GlusterBaseClass
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.misc.misc_libs import upload_scripts
from glustolibs.io.utils import validate_io_procs, get_mounts_stat
@@ -33,7 +30,7 @@ from glustolibs.gluster.volume_libs import (
@runs_on([['distributed-replicated', 'replicated', 'distributed',
'dispersed', 'distributed-dispersed'],
['nfs']])
-class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
+class TestGaneshaAddBrick(GlusterBaseClass):
"""
Test cases to validate add-brick and rebalance functionality on volumes
exported through nfs-ganesha
@@ -47,12 +44,6 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
"""
cls.get_super_method(cls, 'setUpClass')()
- # Setup nfs-ganesha if not exists.
- ret = cls.setup_nfs_ganesha()
- if not ret:
- raise ExecutionError("Failed to setup nfs-ganesha cluster")
- g.log.info("nfs-ganesha cluster is healthy")
-
# Upload IO scripts for running IO on mounts
g.log.info("Upload io scripts to clients %s for running IO on "
"mounts", cls.clients)
@@ -91,13 +82,13 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -179,8 +170,3 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
if not ret:
raise ExecutionError("Failed to cleanup volume")
g.log.info("Cleanup volume %s completed successfully", self.volname)
-
- @classmethod
- def tearDownClass(cls):
- cls.get_super_method(cls, 'tearDownClass')(
- delete_nfs_ganesha_cluster=False)