diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-16 18:26:45 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-12-18 10:26:37 +0000 |
commit | 065f51e673b3ccc39b153423359bed2dd572935d (patch) | |
tree | f1c998d24aa463f567b4742f1c74f95893ffedef /tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py | |
parent | b1dfa315487c2da399988775e5de39354f686b0c (diff) |
[py2to3] Add py3 support in 'tests/functional/dht'
Change-Id: I44fe85519c8fd381064670e54dac8736107b0928
Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py')
-rw-r--r-- | tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py b/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py index 6559a1e7e..ffbda6145 100644 --- a/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py +++ b/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py @@ -14,6 +14,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +import sys from glusto.core import Glusto as g @@ -49,7 +50,7 @@ class RebalanceValidation(GlusterBaseClass): def setUpClass(cls): # Calling GlusterBaseClass setUpClass - GlusterBaseClass.setUpClass.im_func(cls) + cls.get_super_method(cls, 'setUpClass')() # Setup Volume and Mount Volume g.log.info("Starting to Setup Volume and Mount Volume") @@ -89,14 +90,14 @@ class RebalanceValidation(GlusterBaseClass): for index, mount_obj in enumerate(cls.mounts, start=1): 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 1 " "--dir-length 2 " "--max-num-of-dirs 2 " - "--num-of-files 55 %s" % (cls.script_upload_path, - index + 10, - mount_obj.mountpoint)) + "--num-of-files 55 %s" % ( + sys.version_info.major, cls.script_upload_path, + index + 10, mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) cls.all_mounts_procs.append(proc) @@ -220,5 +221,5 @@ class RebalanceValidation(GlusterBaseClass): raise ExecutionError("Failed to Unmount Volume and Cleanup Volume") g.log.info("Volume %s unmount and cleanup: Success", cls.volname) - # Calling GlusterBaseClass tearDown - GlusterBaseClass.tearDownClass.im_func(cls) + # Calling GlusterBaseClass tearDownClass + cls.get_super_method(cls, 'tearDownClass')() |