diff options
Diffstat (limited to 'tests/functional/arbiter/test_create_snapshot_and_verify_content.py')
-rwxr-xr-x | tests/functional/arbiter/test_create_snapshot_and_verify_content.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/functional/arbiter/test_create_snapshot_and_verify_content.py b/tests/functional/arbiter/test_create_snapshot_and_verify_content.py index 53b433ef6..ce479e6b7 100755 --- a/tests/functional/arbiter/test_create_snapshot_and_verify_content.py +++ b/tests/functional/arbiter/test_create_snapshot_and_verify_content.py @@ -14,7 +14,10 @@ # 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 + from glustolibs.gluster.gluster_base_class import (GlusterBaseClass, runs_on) from glustolibs.gluster.exceptions import ExecutionError from glustolibs.gluster.snap_ops import (snap_create, snap_restore) @@ -36,7 +39,7 @@ class TestArbiterSelfHeal(GlusterBaseClass): @classmethod 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 mounts", @@ -54,7 +57,7 @@ class TestArbiterSelfHeal(GlusterBaseClass): def setUp(self): # Calling GlusterBaseClass setUp - GlusterBaseClass.setUp.im_func(self) + self.get_super_method(self, 'setUp')() # Setup Volumes if self.volume_type == "distributed-replicated": @@ -100,7 +103,7 @@ class TestArbiterSelfHeal(GlusterBaseClass): g.log.info('Clearing for all brick is successful') # Calling GlusterBaseClass teardown - GlusterBaseClass.tearDown.im_func(self) + self.get_super_method(self, 'tearDown')() def test_create_snapshot_and_verify_content(self): """ @@ -118,13 +121,14 @@ class TestArbiterSelfHeal(GlusterBaseClass): self.mounts[0].client_system, self.mounts[0].mountpoint) # Create dirs with file g.log.info('Creating dirs with file...') - command = ("python %s create_deep_dirs_with_files " + command = ("/usr/bin/env python%d %s create_deep_dirs_with_files " "-d 2 " "-l 2 " "-n 2 " "-f 20 " - "%s" - % (self.script_upload_path, self.mounts[0].mountpoint)) + "%s" % ( + sys.version_info.major, self.script_upload_path, + self.mounts[0].mountpoint)) ret, _, err = g.run(self.mounts[0].client_system, command, user=self.mounts[0].user) @@ -150,14 +154,14 @@ class TestArbiterSelfHeal(GlusterBaseClass): self.mounts[0].client_system, self.mounts[0].mountpoint) # Create dirs with file g.log.info('Adding dirs with file...') - command = ("python %s create_deep_dirs_with_files " + command = ("/usr/bin/env python%d %s create_deep_dirs_with_files " "-d 2 " "-l 2 " "-n 2 " "-f 20 " - "%s" - % (self.script_upload_path, - self.mounts[0].mountpoint+'/new_files')) + "%s" % ( + sys.version_info.major, self.script_upload_path, + self.mounts[0].mountpoint+'/new_files')) ret, _, err = g.run(self.mounts[0].client_system, command, user=self.mounts[0].user) |