From 24f2f1ca2c9213b4d848863d0db6dcd3804f24b8 Mon Sep 17 00:00:00 2001 From: kshithijiyer Date: Thu, 19 Dec 2019 15:27:16 +0530 Subject: [Fix] Remove variable script_local_path/script_abs_path(Part 4) Please refer to the commit message of the below patch: https://review.gluster.org/#/c/glusto-tests/+/23902/ Change-Id: I1df0324dac2da5aad4064cc72ef77dcb5bf67e4f Signed-off-by: kshithijiyer --- .../afr/test_brick_process_not_started_on_read_only_node_disks.py | 4 +--- tests/functional/afr/test_client_side_quorum_with_auto_option.py | 6 +++--- .../afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py | 6 +++--- tests/functional/afr/test_client_side_quorum_with_cross2.py | 4 +--- .../functional/afr/test_client_side_quorum_with_fixed_for_cross3.py | 6 +++--- .../afr/test_client_side_quorum_with_fixed_validate_max_bricks.py | 6 +++--- .../functional/afr/test_client_side_quorum_with_multiple_volumes.py | 4 +--- .../functional/afr/test_conservative_merge_of_files_heal_command.py | 4 +--- .../afr/test_dist_to_repl_automatic_heal_should_be_triggered.py | 4 +--- tests/functional/afr/test_heal_fail_1x3.py | 4 +--- tests/functional/afr/test_heal_info_should_have_fixed_fields.py | 4 +--- tests/functional/afr/test_manual_heal_should_trigger_heal.py | 4 +--- .../functional/afr/test_multiple_clients_dd_on_same_file_default.py | 4 +--- tests/functional/afr/test_readlink.py | 3 +-- tests/functional/afr/test_self_heal_when_dir_quota_exceeded.py | 4 +--- tests/functional/afr/test_self_heal_with_quota_object_limit.py | 4 +--- .../afr/test_write_io_mount_point_resumed_quorum_restored.py | 4 +--- tests/functional/snapshot/test_snap_uss.py | 3 +-- 18 files changed, 26 insertions(+), 52 deletions(-) diff --git a/tests/functional/afr/test_brick_process_not_started_on_read_only_node_disks.py b/tests/functional/afr/test_brick_process_not_started_on_read_only_node_disks.py index a3e7f05dc..42144e5f7 100644 --- a/tests/functional/afr/test_brick_process_not_started_on_read_only_node_disks.py +++ b/tests/functional/afr/test_brick_process_not_started_on_read_only_node_disks.py @@ -34,11 +34,9 @@ class SelfHealDaemonProcessTests(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_client_side_quorum_with_auto_option.py b/tests/functional/afr/test_client_side_quorum_with_auto_option.py index ff52c58bd..750ca19ed 100755 --- a/tests/functional/afr/test_client_side_quorum_with_auto_option.py +++ b/tests/functional/afr/test_client_side_quorum_with_auto_option.py @@ -50,9 +50,9 @@ class ClientSideQuorumTests(GlusterBaseClass): # 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_abs_path = "/usr/share/glustolibs/io/scripts/file_dir_ops.py" - cls.script_upload_path = script_abs_path - ret = upload_scripts(cls.clients, script_abs_path) + cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" + "file_dir_ops.py") + ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to clients") diff --git a/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py b/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py index 0dab6d09a..160307034 100755 --- a/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py +++ b/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py @@ -51,9 +51,9 @@ class ClientSideQuorumTests(GlusterBaseClass): # 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_abs_path = "/usr/share/glustolibs/io/scripts/file_dir_ops.py" - cls.script_upload_path = script_abs_path - ret = upload_scripts(cls.clients, [script_abs_path]) + cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" + "file_dir_ops.py") + ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to clients") diff --git a/tests/functional/afr/test_client_side_quorum_with_cross2.py b/tests/functional/afr/test_client_side_quorum_with_cross2.py index a12093ae0..86e51ef86 100644 --- a/tests/functional/afr/test_client_side_quorum_with_cross2.py +++ b/tests/functional/afr/test_client_side_quorum_with_cross2.py @@ -49,11 +49,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_client_side_quorum_with_fixed_for_cross3.py b/tests/functional/afr/test_client_side_quorum_with_fixed_for_cross3.py index eb8724dda..ca5f7dfe3 100755 --- a/tests/functional/afr/test_client_side_quorum_with_fixed_for_cross3.py +++ b/tests/functional/afr/test_client_side_quorum_with_fixed_for_cross3.py @@ -53,9 +53,9 @@ class ClientSideQuorumTestsWithSingleVolumeCross3(GlusterBaseClass): # 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_abs_path = "/usr/share/glustolibs/io/scripts/file_dir_ops.py" - cls.script_upload_path = script_abs_path - ret = upload_scripts(cls.clients, [script_abs_path]) + cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" + "file_dir_ops.py") + ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to clients") diff --git a/tests/functional/afr/test_client_side_quorum_with_fixed_validate_max_bricks.py b/tests/functional/afr/test_client_side_quorum_with_fixed_validate_max_bricks.py index 64704b011..8e8652f6e 100755 --- a/tests/functional/afr/test_client_side_quorum_with_fixed_validate_max_bricks.py +++ b/tests/functional/afr/test_client_side_quorum_with_fixed_validate_max_bricks.py @@ -47,9 +47,9 @@ class ClientSideQuorumTests(GlusterBaseClass): # 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_abs_path = "/usr/share/glustolibs/io/scripts/file_dir_ops.py" - cls.script_upload_path = script_abs_path - ret = upload_scripts(cls.clients, script_abs_path) + cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" + "file_dir_ops.py") + ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to clients") diff --git a/tests/functional/afr/test_client_side_quorum_with_multiple_volumes.py b/tests/functional/afr/test_client_side_quorum_with_multiple_volumes.py index ca65474f1..7e060be9a 100644 --- a/tests/functional/afr/test_client_side_quorum_with_multiple_volumes.py +++ b/tests/functional/afr/test_client_side_quorum_with_multiple_volumes.py @@ -50,11 +50,9 @@ class ClientSideQuorumTestsMultipleVols(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_conservative_merge_of_files_heal_command.py b/tests/functional/afr/test_conservative_merge_of_files_heal_command.py index 9a703c948..e8752357b 100644 --- a/tests/functional/afr/test_conservative_merge_of_files_heal_command.py +++ b/tests/functional/afr/test_conservative_merge_of_files_heal_command.py @@ -53,11 +53,9 @@ class VerifySelfHealTriggersHealCommand(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_dist_to_repl_automatic_heal_should_be_triggered.py b/tests/functional/afr/test_dist_to_repl_automatic_heal_should_be_triggered.py index 8ff1377cc..949292e50 100755 --- a/tests/functional/afr/test_dist_to_repl_automatic_heal_should_be_triggered.py +++ b/tests/functional/afr/test_dist_to_repl_automatic_heal_should_be_triggered.py @@ -47,11 +47,9 @@ class TestSelfHeal(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_heal_fail_1x3.py b/tests/functional/afr/test_heal_fail_1x3.py index 4be1f336c..f288bda5d 100644 --- a/tests/functional/afr/test_heal_fail_1x3.py +++ b/tests/functional/afr/test_heal_fail_1x3.py @@ -44,11 +44,9 @@ class TestSelfHeal(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_heal_info_should_have_fixed_fields.py b/tests/functional/afr/test_heal_info_should_have_fixed_fields.py index 3d5da5ac5..3ff7d9f49 100644 --- a/tests/functional/afr/test_heal_info_should_have_fixed_fields.py +++ b/tests/functional/afr/test_heal_info_should_have_fixed_fields.py @@ -49,11 +49,9 @@ class VerifySelfHealTriggersHealCommand(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_manual_heal_should_trigger_heal.py b/tests/functional/afr/test_manual_heal_should_trigger_heal.py index d75355b72..4d3cbb5c9 100755 --- a/tests/functional/afr/test_manual_heal_should_trigger_heal.py +++ b/tests/functional/afr/test_manual_heal_should_trigger_heal.py @@ -45,11 +45,9 @@ class TestSelfHeal(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_multiple_clients_dd_on_same_file_default.py b/tests/functional/afr/test_multiple_clients_dd_on_same_file_default.py index 6c1bca3b2..cdb1ff187 100644 --- a/tests/functional/afr/test_multiple_clients_dd_on_same_file_default.py +++ b/tests/functional/afr/test_multiple_clients_dd_on_same_file_default.py @@ -48,11 +48,9 @@ class VerifySelfHealTriggersHealCommand(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_readlink.py b/tests/functional/afr/test_readlink.py index beb95b311..6b178d091 100644 --- a/tests/functional/afr/test_readlink.py +++ b/tests/functional/afr/test_readlink.py @@ -44,10 +44,9 @@ class AfrReadlinkTest(GlusterBaseClass): # 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_abs_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_abs_path) + ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to clients") diff --git a/tests/functional/afr/test_self_heal_when_dir_quota_exceeded.py b/tests/functional/afr/test_self_heal_when_dir_quota_exceeded.py index 7aa1ba965..11d9d4d9c 100644 --- a/tests/functional/afr/test_self_heal_when_dir_quota_exceeded.py +++ b/tests/functional/afr/test_self_heal_when_dir_quota_exceeded.py @@ -63,11 +63,9 @@ class HealFilesWhenDirQuotaExceeded(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_self_heal_with_quota_object_limit.py b/tests/functional/afr/test_self_heal_with_quota_object_limit.py index f9dde71ba..f77f23b4d 100644 --- a/tests/functional/afr/test_self_heal_with_quota_object_limit.py +++ b/tests/functional/afr/test_self_heal_with_quota_object_limit.py @@ -63,11 +63,9 @@ class HealFilesWhenQuotaObjectLimitExceeded(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/afr/test_write_io_mount_point_resumed_quorum_restored.py b/tests/functional/afr/test_write_io_mount_point_resumed_quorum_restored.py index 7aac1ba70..d03713c86 100755 --- a/tests/functional/afr/test_write_io_mount_point_resumed_quorum_restored.py +++ b/tests/functional/afr/test_write_io_mount_point_resumed_quorum_restored.py @@ -48,11 +48,9 @@ class ClientSideQuorumRestored(GlusterBaseClass): # 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 %s" % cls.clients) diff --git a/tests/functional/snapshot/test_snap_uss.py b/tests/functional/snapshot/test_snap_uss.py index 288722d3e..5371b7439 100644 --- a/tests/functional/snapshot/test_snap_uss.py +++ b/tests/functional/snapshot/test_snap_uss.py @@ -59,10 +59,9 @@ class SnapshotUssSnap(GlusterBaseClass): # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on " "mounts", self.clients) - script_abs_path = "/usr/share/glustolibs/io/scripts/file_dir_ops.py" self.script_upload_path = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") - ret = upload_scripts(self.clients, script_abs_path) + ret = upload_scripts(self.clients, self.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to clients") -- cgit