summaryrefslogtreecommitdiffstats
path: root/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
diff options
context:
space:
mode:
authorPranav <prprakas@redhat.com>2020-07-28 13:48:30 +0530
committerArthy Loganathan <aloganat@redhat.com>2020-07-30 05:08:05 +0000
commit7f9209c7d49b1c20cdb6a7626a95172d6df85be2 (patch)
tree034d9ad2aec711133cad1f403d5f31b66d5bee62 /tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
parent0db380b90b85c54fdb1d29b870380c667fc9167c (diff)
[Libfix] Move NFS Ganesha support to GlusterBaseClass
Problem: NFS-Ganesha Tests inherits 'NfsGaneshaClusterSetupClass' whereas the other tests inherits 'GlusterBaseClass'. This causes a cyclic dependency when trying to run other modules with Nfs-Ganesha. Fix: 1. Move the Nfs-Ganesha dependencies to GlusterBaseClass 2. Modify the Nfs-Ganesha tests to inherit from GlusterBaseClass 3. Remove setup_nfs_ganesha method call from existing Ganesha tests as its invoked by default from GlusterBaseClass.SetUpClass Change-Id: I1e382fdb2b29585c097dfd0fea0b45edafb6442b Signed-off-by: Pranav <prprakas@redhat.com>
Diffstat (limited to 'tests/functional/nfs_ganesha/test_ganesha_replace_brick.py')
-rw-r--r--tests/functional/nfs_ganesha/test_ganesha_replace_brick.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
index 12cec1a74..f87fd03f2 100644
--- a/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
+++ b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
@@ -16,8 +16,7 @@
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
@@ -31,7 +30,7 @@ from glustolibs.gluster.heal_libs import monitor_heal_completion
@runs_on([['distributed-replicated', 'replicated',
'dispersed', 'distributed-dispersed'],
['nfs']])
-class TestGaneshaReplaceBrick(NfsGaneshaClusterSetupClass):
+class TestGaneshaReplaceBrick(GlusterBaseClass):
"""
Test cases to validate remove brick functionality on volumes
exported through nfs-ganesha
@@ -45,12 +44,6 @@ class TestGaneshaReplaceBrick(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)
@@ -169,8 +162,3 @@ class TestGaneshaReplaceBrick(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)