summaryrefslogtreecommitdiffstats
path: root/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/afr/test_afr_cli_gfid_splitbrain.py')
-rw-r--r--tests/functional/afr/test_afr_cli_gfid_splitbrain.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/functional/afr/test_afr_cli_gfid_splitbrain.py b/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
index ec3f803e9..d99aa5b36 100644
--- a/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
+++ b/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-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
@@ -15,8 +15,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# pylint: disable=too-many-statements, too-many-locals
-
from glusto.core import Glusto as g
+
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
from glustolibs.gluster.brick_libs import (get_all_bricks,
@@ -38,16 +38,14 @@ class TestSelfHeal(GlusterBaseClass):
def setUpClass(cls):
# Calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Upload io scripts for running IO on mounts
g.log.info("Upload io scripts to clients %s for running IO on "
"mounts", cls.clients)
- script_local_path = ("/usr/share/glustolibs/io/scripts/"
- "file_dir_ops.py")
cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/"
"file_dir_ops.py")
- ret = upload_scripts(cls.clients, script_local_path)
+ ret = upload_scripts(cls.clients, cls.script_upload_path)
if not ret:
raise ExecutionError("Failed to upload IO scripts "
"to clients %s" % cls.clients)
@@ -79,7 +77,7 @@ class TestSelfHeal(GlusterBaseClass):
raise ExecutionError("Failed to create volume")
g.log.info("Successful in cleaning up Volume %s", cls.volname)
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_afr_gfid_heal(self):
@@ -111,9 +109,10 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("creating a file from mount point")
all_mounts_procs = []
- cmd = ("python %s create_files "
- "-f 1 --base-file-name test_file --fixed-file-size 1k %s"
- % (self.script_upload_path, self.mounts[0].mountpoint))
+ cmd = ("/usr/bin/env python %s create_files "
+ "-f 1 --base-file-name test_file --fixed-file-size 1k %s" % (
+ self.script_upload_path,
+ self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, cmd)
all_mounts_procs.append(proc)
# Validate I/O
@@ -137,9 +136,10 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("creating a new file of same name from mount point")
all_mounts_procs = []
- cmd = ("python %s create_files "
- "-f 1 --base-file-name test_file --fixed-file-size 1k %s"
- % (self.script_upload_path, self.mounts[0].mountpoint))
+ cmd = ("/usr/bin/env python %s create_files "
+ "-f 1 --base-file-name test_file --fixed-file-size 1k %s" % (
+ self.script_upload_path,
+ self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, cmd)
all_mounts_procs.append(proc)
# Validate I/O