summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_profile_operations.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/glusterd/test_profile_operations.py')
-rw-r--r--tests/functional/glusterd/test_profile_operations.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/functional/glusterd/test_profile_operations.py b/tests/functional/glusterd/test_profile_operations.py
index ae0a968eb..9eb304a92 100644
--- a/tests/functional/glusterd/test_profile_operations.py
+++ b/tests/functional/glusterd/test_profile_operations.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2019-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
@@ -20,6 +20,7 @@
"""
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.profile_ops import (profile_start, profile_info,
@@ -40,16 +41,14 @@ class TestProfileOpeartions(GlusterBaseClass):
@classmethod
def setUpClass(cls):
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Uploading file_dir script in all client direcotries
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)
@@ -57,8 +56,7 @@ class TestProfileOpeartions(GlusterBaseClass):
cls.clients)
def setUp(self):
-
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
# Creating Volume and mounting volume.
ret = self.setup_volume_and_mount_volume(self.mounts)
if not ret:
@@ -85,7 +83,7 @@ class TestProfileOpeartions(GlusterBaseClass):
raise ExecutionError("Unable to delete volume % s" % volume)
g.log.info("Volume deleted successfully : %s", volume)
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_profile_operations(self):
@@ -113,14 +111,14 @@ class TestProfileOpeartions(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dir-depth 4 "
"--dir-length 6 "
"--dirname-start-num %d "
"--max-num-of-dirs 3 "
- "--num-of-files 5 %s"
- % (self.script_upload_path, counter,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ self.script_upload_path,
+ counter, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
self.all_mounts_procs.append(proc)