summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot/test_snap_uss.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/snapshot/test_snap_uss.py')
-rw-r--r--tests/functional/snapshot/test_snap_uss.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/tests/functional/snapshot/test_snap_uss.py b/tests/functional/snapshot/test_snap_uss.py
index 60e06f359..69887934e 100644
--- a/tests/functional/snapshot/test_snap_uss.py
+++ b/tests/functional/snapshot/test_snap_uss.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 snapshot and USS feature.
"""
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
runs_on)
@@ -46,7 +48,7 @@ class SnapshotUssSnap(GlusterBaseClass):
def setUp(self):
# SettingUp volume and Mounting the volume
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
g.log.info("Starting to SetUp and Mount Volume")
ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
if not ret:
@@ -56,10 +58,9 @@ class SnapshotUssSnap(GlusterBaseClass):
# Upload io scripts for running IO on mounts
g.log.info("Upload io scripts to clients %s for running IO on "
"mounts", self.clients)
- script_abs_path = "/usr/share/glustolibs/io/scripts/file_dir_ops.py"
self.script_upload_path = ("/usr/share/glustolibs/io/scripts/"
"file_dir_ops.py")
- ret = upload_scripts(self.clients, script_abs_path)
+ ret = upload_scripts(self.clients, self.script_upload_path)
if not ret:
raise ExecutionError("Failed to upload IO scripts to clients")
@@ -89,9 +90,10 @@ class SnapshotUssSnap(GlusterBaseClass):
g.log.info("mounts: %s", self.mounts)
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = ("python %s create_files "
- "-f 10 --base-file-name file %s" % (self.script_upload_path,
- mount_obj.mountpoint))
+ cmd = ("/usr/bin/env python %s create_files "
+ "-f 10 --base-file-name file %s" % (
+ self.script_upload_path,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -127,9 +129,10 @@ class SnapshotUssSnap(GlusterBaseClass):
ret = mkdir(mount_obj.client_system, self.mpoint)
self.assertTrue(ret, "Failed to create .snaps directory")
g.log.info("Successfully created .snaps directory")
- cmd = ("python %s create_files "
- "-f 10 --base-file-name foo %s"
- % (self.script_upload_path, self.mpoint))
+ cmd = ("/usr/bin/env python %s create_files "
+ "-f 10 --base-file-name foo %s" % (
+ self.script_upload_path,
+ self.mpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -226,7 +229,7 @@ class SnapshotUssSnap(GlusterBaseClass):
def tearDown(self):
# Calling GlusterBaseClass tearDown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
# deleting created snapshots
g.log.info("Deleting all snapshots")