summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot/test_snap_rebalance.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/snapshot/test_snap_rebalance.py')
-rw-r--r--tests/functional/snapshot/test_snap_rebalance.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/functional/snapshot/test_snap_rebalance.py b/tests/functional/snapshot/test_snap_rebalance.py
index 8b68cd1e9..8cbc18ca5 100644
--- a/tests/functional/snapshot/test_snap_rebalance.py
+++ b/tests/functional/snapshot/test_snap_rebalance.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
@@ -21,7 +21,9 @@ Test Cases in this module tests the
Creation of clone from snapshot of one volume.
"""
+
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.mount_ops import mount_volume, is_mounted
@@ -43,18 +45,16 @@ class SnapshotRebalance(GlusterBaseClass):
@classmethod
def setUpClass(cls):
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
cls.snap = "snap0"
cls.clone = "clone1"
cls.mount1 = "/mnt/clone1"
# 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 ")
@@ -101,7 +101,7 @@ class SnapshotRebalance(GlusterBaseClass):
def setUp(self):
# SetUp volume and Mounting the volume
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
g.log.info("Starting to SetUp Volume")
ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
if not ret:
@@ -174,9 +174,10 @@ class SnapshotRebalance(GlusterBaseClass):
# write files to mountpoint
g.log.info("Starting IO on %s mountpoint...", self.mount1)
all_mounts_procs = []
- cmd = ("python %s create_files "
- "-f 10 --base-file-name file %s" % (self.script_upload_path,
- self.mount1))
+ cmd = ("/usr/bin/env python %s create_files "
+ "-f 10 --base-file-name file %s" % (
+ self.script_upload_path,
+ self.mount1))
proc = g.run(self.clients[0], cmd)
all_mounts_procs.append(proc)
@@ -232,4 +233,4 @@ class SnapshotRebalance(GlusterBaseClass):
g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass teardown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()