diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-10 21:57:09 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-12-17 06:07:20 +0000 |
commit | fff20da7fa964453a74206d25e8009c1ae202f56 (patch) | |
tree | e6ec94cb62952a362c9ab427ee2309259518cc9e /tests/functional/snapshot/test_restore_online_vol.py | |
parent | 5189557f8c3332e936842b3a21e44b5df21f7698 (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_restore_online_vol.py')
-rw-r--r-- | tests/functional/snapshot/test_restore_online_vol.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/functional/snapshot/test_restore_online_vol.py b/tests/functional/snapshot/test_restore_online_vol.py index 023e9ead4..a7b407c27 100644 --- a/tests/functional/snapshot/test_restore_online_vol.py +++ b/tests/functional/snapshot/test_restore_online_vol.py @@ -20,7 +20,10 @@ Description: When we try to restore online volume it should fail. """ +import sys + from glusto.core import Glusto as g + from glustolibs.gluster.exceptions import ExecutionError from glustolibs.gluster.gluster_base_class import GlusterBaseClass from glustolibs.gluster.gluster_base_class import runs_on @@ -37,7 +40,8 @@ class SnapRSOnline(GlusterBaseClass): @classmethod def setUpClass(cls): - 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) @@ -54,7 +58,7 @@ class SnapRSOnline(GlusterBaseClass): def setUp(self): # SettingUp and Mounting the volume - GlusterBaseClass.setUp.im_func(self) + self.get_super_method(self, 'setUp')() g.log.info("Starting to SetUp Volume and mount volume") ret = self.setup_volume_and_mount_volume(mounts=self.mounts) if not ret: @@ -103,14 +107,14 @@ class SnapRSOnline(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%d %s create_deep_dirs_with_files " "--dirname-start-num %d " "--dir-depth 2 " "--dir-length 2 " "--max-num-of-dirs 2 " - "--num-of-files 2 %s" % (self.script_upload_path, - self.counter, - mount_obj.mountpoint)) + "--num-of-files 2 %s" % ( + sys.version_info.major, self.script_upload_path, + self.counter, mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) |