summaryrefslogtreecommitdiffstats
path: root/tests/distaf/tests_d/examples/test_basic_gluster_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/distaf/tests_d/examples/test_basic_gluster_tests.py')
-rw-r--r--tests/distaf/tests_d/examples/test_basic_gluster_tests.py33
1 files changed, 24 insertions, 9 deletions
diff --git a/tests/distaf/tests_d/examples/test_basic_gluster_tests.py b/tests/distaf/tests_d/examples/test_basic_gluster_tests.py
index 47dfd9372a7..d981c0b8ab5 100644
--- a/tests/distaf/tests_d/examples/test_basic_gluster_tests.py
+++ b/tests/distaf/tests_d/examples/test_basic_gluster_tests.py
@@ -17,10 +17,8 @@
from distaf.util import tc, testcase
-from distaf.gluster_base_class import GlusterBaseClass
-from distaf.gluster_libs.mount_ops import mount_volume, umount_volume
-from distaf.gluster_libs.volume_ops import (setup_vol, stop_volume,
- delete_volume)
+from distaflibs.gluster.gluster_base_class import GlusterBaseClass
+from distaflibs.gluster.mount_ops import mount_volume, umount_volume
@testcase("gluster_basic_test")
@@ -28,17 +26,17 @@ class gluster_basic_test(GlusterBaseClass):
"""
runs_on_volumes: ALL
runs_on_protocol: [ glusterfs, nfs ]
- reuse_setup: True
+ reuse_setup: False
"""
def run(self):
_rc = True
client = self.clients[0]
tc.run(self.mnode, "gluster volume status %s" % self.volname)
- ret, _, _ = mount_volume(self.volname, self.mount_proto, \
- self.mountpoint, mclient=client)
+ ret, _, _ = mount_volume(self.volname, self.mount_proto,
+ self.mountpoint, mclient=client)
if ret != 0:
- tc.logger.error("Unable to mount the volume %s in %s" \
- "Please check the logs" % (self.volname, client))
+ tc.logger.error("Unable to mount the volume %s in %s"
+ "Please check the logs" % (self.volname, client))
return False
ret, _, _ = tc.run(client, "cp -r /etc %s" % self.mountpoint)
if ret != 0:
@@ -47,3 +45,20 @@ class gluster_basic_test(GlusterBaseClass):
tc.run(client, "rm -rf %s/etc" % self.mountpoint)
umount_volume(client, self.mountpoint)
return _rc
+
+
+@testcase("dummy_testcase")
+class dummy_testcase(GlusterBaseClass):
+ """
+ runs_on_volumes: ALL
+ runs_on_protocol: [ glusterfs, nfs ]
+ reuse_setup: False
+ """
+ def run(self):
+ _rc = True
+ ret, _, _ = tc.run(self.mnode, "gluster volume status %s" % self.volname)
+ if ret != 0:
+ tc.logger.error("Unable to thet the status of %s", self.volname)
+ _rc = False
+
+ return _rc