diff options
Diffstat (limited to 'tests/functional/snapshot/test_snap_clone_from_snap.py')
-rw-r--r-- | tests/functional/snapshot/test_snap_clone_from_snap.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/functional/snapshot/test_snap_clone_from_snap.py b/tests/functional/snapshot/test_snap_clone_from_snap.py index 8b8e46eda..b976cdb41 100644 --- a/tests/functional/snapshot/test_snap_clone_from_snap.py +++ b/tests/functional/snapshot/test_snap_clone_from_snap.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com> +# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ Creation of clone volume from snapshot. """ 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 @@ -41,25 +42,23 @@ class SnapshotCloneValidate(GlusterBaseClass): @classmethod def setUpClass(cls): - GlusterBaseClass.setUpClass.im_func(cls) + cls.get_super_method(cls, 'setUpClass')() cls.snap = "snap0" # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on " "mounts", cls.clients) - script_local_path = ("/usr/share/glustolibs/io/scripts/" - "file_dir_ops.py") cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") - ret = upload_scripts(cls.clients, script_local_path) + ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts " "to clients ") g.log.info("Successfully uploaded IO scripts to clients %s") def setUp(self): + self.get_super_method(self, 'setUp')() - GlusterBaseClass.setUpClass.im_func(self) g.log.info("Starting to SetUp Volume") ret = self.setup_volume_and_mount_volume(mounts=self.mounts) if not ret: @@ -91,9 +90,10 @@ class SnapshotCloneValidate(GlusterBaseClass): g.log.info("mounts: %s", self.mounts) all_mounts_procs = [] for mount_obj in self.mounts: - cmd = ("python %s create_files " - "-f 10 --base-file-name file %s" % (self.script_upload_path, - mount_obj.mountpoint)) + cmd = ("/usr/bin/env python %s create_files " + "-f 10 --base-file-name file %s" % ( + self.script_upload_path, + mount_obj.mountpoint)) proc = g.run(self.clients[0], cmd) all_mounts_procs.append(proc) g.log.info("Successfully Performed I/O on all mount points") |