summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot/test_snap_delete_original_volume.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-10 21:57:09 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-12-17 06:07:20 +0000
commitfff20da7fa964453a74206d25e8009c1ae202f56 (patch)
treee6ec94cb62952a362c9ab427ee2309259518cc9e /tests/functional/snapshot/test_snap_delete_original_volume.py
parent5189557f8c3332e936842b3a21e44b5df21f7698 (diff)
[py2to3] Add py3 support in 'tests/functional/snapshot'
Change-Id: Ie408d7972452123b63eb5cc17c61bc319a99e304 Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'tests/functional/snapshot/test_snap_delete_original_volume.py')
-rw-r--r--tests/functional/snapshot/test_snap_delete_original_volume.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/functional/snapshot/test_snap_delete_original_volume.py b/tests/functional/snapshot/test_snap_delete_original_volume.py
index 1bf62fd87..4240ea510 100644
--- a/tests/functional/snapshot/test_snap_delete_original_volume.py
+++ b/tests/functional/snapshot/test_snap_delete_original_volume.py
@@ -23,7 +23,10 @@ and delete snapshot and original volume.
Validate cloned volume is not affected.
"""
+import sys
+
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.volume_libs import cleanup_volume
@@ -45,7 +48,7 @@ class SnapshotSelfheal(GlusterBaseClass):
@classmethod
def setUpClass(cls):
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
cls.clone = "clone1"
cls.mpoint = "/mnt/clone1"
@@ -89,8 +92,10 @@ class SnapshotSelfheal(GlusterBaseClass):
"%s", mount_obj.client_system, mount_obj.mountpoint)
# Create files
g.log.info('Creating files...')
- command = ("python %s create_files -f 100 --fixed-file-size 1k %s"
- % (self.script_upload_path, mount_obj.mountpoint))
+ command = ("/usr/bin/env python%d %s create_files -f 100 "
+ "--fixed-file-size 1k %s" % (
+ sys.version_info.major, self.script_upload_path,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -187,7 +192,7 @@ class SnapshotSelfheal(GlusterBaseClass):
def tearDown(self):
# Calling GlusterBaseClass teardown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
# Cleanup cloned volume
g.log.info("Starting to delete cloned volume")