From 065f51e673b3ccc39b153423359bed2dd572935d Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Mon, 16 Dec 2019 18:26:45 +0530 Subject: [py2to3] Add py3 support in 'tests/functional/dht' Change-Id: I44fe85519c8fd381064670e54dac8736107b0928 Signed-off-by: Valerii Ponomarov --- .../test_add_brick_while_remove_brick_is_in_progress.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py') diff --git a/tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py b/tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py index 21297ced8..bff9fc2c2 100644 --- a/tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py +++ b/tests/functional/dht/test_add_brick_while_remove_brick_is_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 @@ -41,7 +42,7 @@ class RemoveBrickValidation(GlusterBaseClass): def setUpClass(cls): # Calling GlusterBaseClass setUpClass - 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 " @@ -60,7 +61,7 @@ class RemoveBrickValidation(GlusterBaseClass): def setUp(self): # Calling GlusterBaseClass setUp - GlusterBaseClass.setUp.im_func(self) + self.get_super_method(self, 'setUp')() # Setup Volume and Mount Volume g.log.info("Starting to Setup Volume and Mount Volume") @@ -86,14 +87,14 @@ class RemoveBrickValidation(GlusterBaseClass): for index, mount_obj in enumerate(self.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 2 " "--dir-length 2 " "--max-num-of-dirs 2 " - "--num-of-files 10 %s" % (self.script_upload_path, - index + 10, - mount_obj.mountpoint)) + "--num-of-files 10 %s" % ( + sys.version_info.major, self.script_upload_path, + index + 10, mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) all_mounts_procs.append(proc) @@ -134,7 +135,7 @@ class RemoveBrickValidation(GlusterBaseClass): g.log.info("Successful in Unmount Volume and Cleanup Volume") # Calling GlusterBaseClass tearDown - GlusterBaseClass.tearDown.im_func(self) + self.get_super_method(self, 'tearDown')() def test_add_brick_while_remove_brick_is_in_progress(self): # DHT Layout and hash validation -- cgit