summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-02-20 00:15:46 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-02-26 06:00:55 +0000
commit17fa26e1f33e5c29b7ed0e205dc85376948c5f92 (patch)
tree97446b65c181a15be00a9167ae798e0f3cd87731 /tests
parentc7658429acadb6429d4d64ff04543dfbff478bc1 (diff)
[Testfix] Remove python version dependency(Part 2)
Please refer to commit message of patch [1]. [1] https://review.gluster.org/#/c/glusto-tests/+/24140/ Change-Id: Ic0b3b1333ac7b1ae02f701943d49510e6d46c259 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/functional/arbiter/brick_cases/test_brickcases.py9
-rwxr-xr-xtests/functional/arbiter/brick_cases/test_cyclic_brick_kill_list.py8
-rwxr-xr-xtests/functional/arbiter/brick_cases/test_rmvrf_files.py6
-rwxr-xr-xtests/functional/arbiter/test_create_snapshot_and_verify_content.py10
-rw-r--r--tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py10
-rwxr-xr-xtests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py10
-rwxr-xr-xtests/functional/arbiter/test_data_self_heal_algorithm_full_default.py10
-rw-r--r--tests/functional/arbiter/test_data_self_heal_daemon_off.py12
-rw-r--r--tests/functional/arbiter/test_entry_self_heal_heal_command.py20
-rwxr-xr-xtests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py6
-rwxr-xr-xtests/functional/arbiter/test_mount_point_while_deleting_files.py9
-rwxr-xr-xtests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py14
-rwxr-xr-xtests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py6
-rw-r--r--tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py6
-rwxr-xr-xtests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py12
-rw-r--r--tests/functional/disperse/test_ec_add_brick.py11
-rw-r--r--tests/functional/disperse/test_ec_fops.py7
-rw-r--r--tests/functional/disperse/test_ec_fops_brickdown.py12
-rw-r--r--tests/functional/disperse/test_ec_remove_brick.py11
-rw-r--r--tests/functional/disperse/test_ec_reset.py11
-rw-r--r--tests/functional/disperse/test_ec_verify_datacorruption_during_full_heal.py13
-rw-r--r--tests/functional/disperse/test_ec_verify_full_heal.py13
22 files changed, 89 insertions, 137 deletions
diff --git a/tests/functional/arbiter/brick_cases/test_brickcases.py b/tests/functional/arbiter/brick_cases/test_brickcases.py
index 2b006cb..766012b 100755
--- a/tests/functional/arbiter/brick_cases/test_brickcases.py
+++ b/tests/functional/arbiter/brick_cases/test_brickcases.py
@@ -16,7 +16,6 @@
""" Test Arbiter Specific Cases"""
-import sys
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass, runs_on)
from glustolibs.gluster.volume_libs import (
@@ -126,10 +125,10 @@ class GlusterArbiterVolumeTypeChangeClass(GlusterBaseClass):
self.all_mounts_procs = []
g.log.info("Starting IO on %s:%s", self.mounts[0].client_system,
self.mounts[0].mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num 10 --dir-depth 1 --dir-length 1 "
"--max-num-of-dirs 1 --num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, cmd,
user=self.mounts[0].user)
@@ -186,10 +185,10 @@ class GlusterArbiterVolumeTypeChangeClass(GlusterBaseClass):
self.all_mounts_procs = []
g.log.info("Starting IO on %s:%s", self.mounts[0].client_system,
self.mounts[0].mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num 10 --dir-depth 1 --dir-length 1 "
"--max-num-of-dirs 1 --num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, cmd,
user=self.mounts[0].user)
diff --git a/tests/functional/arbiter/brick_cases/test_cyclic_brick_kill_list.py b/tests/functional/arbiter/brick_cases/test_cyclic_brick_kill_list.py
index cbfdbfa..642c6f0 100755
--- a/tests/functional/arbiter/brick_cases/test_cyclic_brick_kill_list.py
+++ b/tests/functional/arbiter/brick_cases/test_cyclic_brick_kill_list.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
@@ -14,7 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
import time
from glusto.core import Glusto as g
@@ -135,14 +134,13 @@ class ListMount(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s "
+ cmd = ("/usr/bin/env python %s "
"--file-sizes-list 1G "
"--chunk-sizes-list 128 "
"--write-time 900 "
"--num-of-files 2 "
"--base-file-name test_brick_down_from_client_%s.txt "
- "--dir %s " % (sys.version_info.major,
- self.script_upload_path,
+ "--dir %s " % (self.script_upload_path,
mount_obj.client_system,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
diff --git a/tests/functional/arbiter/brick_cases/test_rmvrf_files.py b/tests/functional/arbiter/brick_cases/test_rmvrf_files.py
index 80bd05b..9dbaa74 100755
--- a/tests/functional/arbiter/brick_cases/test_rmvrf_files.py
+++ b/tests/functional/arbiter/brick_cases/test_rmvrf_files.py
@@ -14,8 +14,6 @@
# 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)
@@ -131,13 +129,13 @@ class TestRmrfMount(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 35 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.counter, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
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 c15d379..ec7e801 100755
--- a/tests/functional/arbiter/test_create_snapshot_and_verify_content.py
+++ b/tests/functional/arbiter/test_create_snapshot_and_verify_content.py
@@ -14,8 +14,6 @@
# 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)
@@ -110,9 +108,9 @@ class TestArbiterSelfHeal(GlusterBaseClass):
# Create dirs with file
all_mounts_procs = []
g.log.info('Creating dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
"-d 2 -l 2 -n 2 -f 20 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, command,
user=self.mounts[0].user)
@@ -142,9 +140,9 @@ class TestArbiterSelfHeal(GlusterBaseClass):
# Create dirs with file
all_mounts_procs = []
g.log.info('Adding dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
"-d 2 -l 2 -n 2 -f 20 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint+'/new_files'))
proc = g.run_async(self.mounts[0].client_system, command,
user=self.mounts[0].user)
diff --git a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py
index def1f7c..17c2ba4 100644
--- a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py
+++ b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_default.py
@@ -14,8 +14,6 @@
# 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)
@@ -118,8 +116,8 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("Generating data for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)
# Creating files
- command = "/usr/bin/env python%d %s create_files -f 100 %s" % (
- sys.version_info.major, self.script_upload_path,
+ command = "/usr/bin/env python %s create_files -f 100 %s" % (
+ self.script_upload_path,
self.mounts[0].mountpoint)
proc = g.run_async(self.mounts[0].client_system, command,
@@ -157,9 +155,9 @@ class TestSelfHeal(GlusterBaseClass):
all_mounts_procs = []
g.log.info("Modifying data for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)
- command = ("/usr/bin/env python%d %s create_files -f 100 "
+ command = ("/usr/bin/env python %s create_files -f 100 "
"--fixed-file-size 1M %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, command,
diff --git a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py
index 4f4065d..132b9df 100755
--- a/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py
+++ b/tests/functional/arbiter/test_data_self_heal_algorithm_diff_heal_command.py
@@ -14,8 +14,6 @@
# 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)
@@ -139,8 +137,8 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("Generating data for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)
# Creating files
- command = "/usr/bin/env python%d %s create_files -f 100 %s" % (
- sys.version_info.major, self.script_upload_path,
+ command = "/usr/bin/env python %s create_files -f 100 %s" % (
+ self.script_upload_path,
self.mounts[0].mountpoint)
proc = g.run_async(self.mounts[0].client_system, command,
@@ -185,9 +183,9 @@ class TestSelfHeal(GlusterBaseClass):
all_mounts_procs = []
g.log.info("Modifying data for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)
- command = ("/usr/bin/env python%d %s create_files -f 100 "
+ command = ("/usr/bin/env python %s create_files -f 100 "
"--fixed-file-size 1M %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, command,
diff --git a/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py b/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py
index 4ab2203..82538d4 100755
--- a/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py
+++ b/tests/functional/arbiter/test_data_self_heal_algorithm_full_default.py
@@ -14,8 +14,6 @@
# 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)
@@ -117,8 +115,8 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("Generating data for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)
# Creating files
- command = "/usr/bin/env python%d %s create_files -f 100 %s" % (
- sys.version_info.major, self.script_upload_path,
+ command = "/usr/bin/env python %s create_files -f 100 %s" % (
+ self.script_upload_path,
self.mounts[0].mountpoint)
proc = g.run_async(self.mounts[0].client_system, command,
@@ -156,9 +154,9 @@ class TestSelfHeal(GlusterBaseClass):
all_mounts_procs = []
g.log.info("Modifying data for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)
- command = ("/usr/bin/env python%d %s create_files -f 100 "
+ command = ("/usr/bin/env python %s create_files -f 100 "
"--fixed-file-size 1M %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, command,
diff --git a/tests/functional/arbiter/test_data_self_heal_daemon_off.py b/tests/functional/arbiter/test_data_self_heal_daemon_off.py
index 7f23c7c..df2e58a 100644
--- a/tests/functional/arbiter/test_data_self_heal_daemon_off.py
+++ b/tests/functional/arbiter/test_data_self_heal_daemon_off.py
@@ -14,7 +14,6 @@
# 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 time import sleep
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass, runs_on)
@@ -136,9 +135,9 @@ class TestSelfHeal(GlusterBaseClass):
# Creating files on client side
g.log.info("Starting IO on %s:%s", self.mounts[0].client_system,
self.mounts[0].mountpoint)
- cmd = ("/usr/bin/env python%d %s create_files -f 100"
+ cmd = ("/usr/bin/env python %s create_files -f 100"
" --fixed-file-size 1k %s"
- % (sys.version_info.major, self.script_upload_path,
+ % (self.script_upload_path,
self.mounts[0].mountpoint))
ret, _, err = g.run(self.mounts[0].client_system, cmd,
user=self.mounts[0].user)
@@ -202,9 +201,9 @@ class TestSelfHeal(GlusterBaseClass):
# Modify the data
g.log.info("Modifying data for %s:%s", self.mounts[0].client_system,
self.mounts[0].mountpoint)
- cmd = ("/usr/bin/env python%d %s create_files -f 100"
+ cmd = ("/usr/bin/env python %s create_files -f 100"
" --fixed-file-size 10k %s"
- % (sys.version_info.major, self.script_upload_path,
+ % (self.script_upload_path,
self.mounts[0].mountpoint))
ret, _, err = g.run(self.mounts[0].client_system, cmd,
user=self.mounts[0].user)
@@ -290,7 +289,8 @@ class TestSelfHeal(GlusterBaseClass):
all_mounts_procs = []
g.log.info("Modifying data for %s:%s", self.mounts[0].client_system,
self.mounts[0].mountpoint)
- command = ("python %s create_files -f 1000 --base-file-name newfile %s"
+ command = ("/usr/bin/env python %s create_files -f 1000"
+ " --base-file-name newfile %s"
% (self.script_upload_path, self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, command,
diff --git a/tests/functional/arbiter/test_entry_self_heal_heal_command.py b/tests/functional/arbiter/test_entry_self_heal_heal_command.py
index a268fb6..ced2bc1 100644
--- a/tests/functional/arbiter/test_entry_self_heal_heal_command.py
+++ b/tests/functional/arbiter/test_entry_self_heal_heal_command.py
@@ -14,8 +14,6 @@
# 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)
@@ -136,12 +134,12 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("Starting IO on all mounts...")
g.log.info("Starting IO on %s:%s", self.mounts[0].client_system,
self.mounts[0].mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dir-length 2 "
"--dir-depth 2 "
"--max-num-of-dirs 2 "
"--num-of-files 20 %s/files" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint))
ret, _, err = g.run(self.mounts[0].client_system, cmd,
user=self.mounts[0].user)
@@ -153,11 +151,11 @@ class TestSelfHeal(GlusterBaseClass):
# Command list to do different operations with data -
# create, rename, copy and delete
cmds = (
- "/usr/bin/env python%d %s create_files -f 20 %s/files",
- "/usr/bin/env python%d %s mv %s/files",
+ "/usr/bin/env python %s create_files -f 20 %s/files",
+ "/usr/bin/env python %s mv %s/files",
# 'copy' command works incorrect. disable until fixed
- # "/usr/bin/env python%d %s copy --dest-dir %s/new_dir %s/files",
- "/usr/bin/env python%d %s delete %s",
+ # "/usr/bin/env python %s copy --dest-dir %s/new_dir %s/files",
+ "/usr/bin/env python %s delete %s",
)
for cmd in cmds:
# Get arequal before getting bricks offline
@@ -218,13 +216,11 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("Modifying IO on %s:%s", self.mounts[0].client_system,
self.mounts[0].mountpoint)
if 'copy --dest-dir' in cmd:
- parsed_cmd = cmd % (sys.version_info.major,
- self.script_upload_path,
+ parsed_cmd = cmd % (self.script_upload_path,
self.mounts[0].mountpoint,
self.mounts[0].mountpoint)
else:
- parsed_cmd = cmd % (sys.version_info.major,
- self.script_upload_path,
+ parsed_cmd = cmd % (self.script_upload_path,
self.mounts[0].mountpoint)
ret, _, err = g.run(self.mounts[0].client_system, parsed_cmd,
user=self.mounts[0].user)
diff --git a/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py b/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py
index 23bd405..1cb4f2c 100755
--- a/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py
+++ b/tests/functional/arbiter/test_handling_data_split_brain_of_files_heal_command.py
@@ -14,8 +14,6 @@
# 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)
@@ -315,8 +313,8 @@ class TestArbiterSelfHeal(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Start heal for %s:%s",
mount_obj.client_system, mount_obj.mountpoint)
- command = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ command = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
self.mounts[0].mountpoint)
ret, _, err = g.run(mount_obj.client_system, command)
self.assertFalse(ret, err)
diff --git a/tests/functional/arbiter/test_mount_point_while_deleting_files.py b/tests/functional/arbiter/test_mount_point_while_deleting_files.py
index 520cb7e..6acb8e0 100755
--- a/tests/functional/arbiter/test_mount_point_while_deleting_files.py
+++ b/tests/functional/arbiter/test_mount_point_while_deleting_files.py
@@ -15,7 +15,6 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
-import sys
from glusto.core import Glusto as g
@@ -198,11 +197,11 @@ class VolumeSetDataSelfHealTests(GlusterBaseClass):
mount_obj.client_system, mount_obj.mountpoint)
# Create files
g.log.info('Creating files...')
- command = ("/usr/bin/env python%d %s create_files "
+ command = ("/usr/bin/env python %s create_files "
"-f 100 "
"--fixed-file-size 1M "
"%s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
@@ -241,8 +240,8 @@ class VolumeSetDataSelfHealTests(GlusterBaseClass):
mount_obj.client_system, mount_obj.mountpoint)
# Delete files
g.log.info('Deleting files...')
- command = "/usr/bin/env python%d %s delete %s" % (
- sys.version_info.major, self.script_upload_path,
+ command = "/usr/bin/env python %s delete %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, command,
user=mount_obj.user)
diff --git a/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py b/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py
index 981e9cd..4f30249 100755
--- a/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py
+++ b/tests/functional/arbiter/test_no_data_loss_arbiter_vol_after_rename_file.py
@@ -14,8 +14,6 @@
# 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)
@@ -131,9 +129,9 @@ class ArbiterSelfHealTests(GlusterBaseClass):
self.mounts[0].client_system, self.mounts[0].mountpoint)
# Create dir
g.log.info('Creating dir...')
- command = ('/usr/bin/env python%d %s create_deep_dir -d 1 -l 0 -n 1 '
+ command = ('/usr/bin/env python %s create_deep_dir -d 1 -l 0 -n 1 '
'%s/%s' % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.mounts[0].mountpoint, test_dir))
ret, _, err = g.run(self.mounts[0].client_system, command,
@@ -166,8 +164,8 @@ class ArbiterSelfHealTests(GlusterBaseClass):
self.mounts[0].client_system, self.mounts[0].mountpoint)
# Create file
g.log.info('Creating file...')
- command = "/usr/bin/env python%d %s create_files -f 1 %s/%s" % (
- sys.version_info.major, self.script_upload_path,
+ command = "/usr/bin/env python %s create_files -f 1 %s/%s" % (
+ self.script_upload_path,
self.mounts[0].mountpoint, test_dir)
ret, _, err = g.run(self.mounts[0].client_system, command,
@@ -214,8 +212,8 @@ class ArbiterSelfHealTests(GlusterBaseClass):
# Rename file under test_dir
g.log.info("Renaming file for %s:%s",
self.mounts[0].client_system, self.mounts[0].mountpoint)
- command = "/usr/bin/env python%d %s mv %s/%s" % (
- sys.version_info.major, self.script_upload_path,
+ command = "/usr/bin/env python %s mv %s/%s" % (
+ self.script_upload_path,
self.mounts[0].mountpoint, test_dir)
ret, _, err = g.run(self.mounts[0].client_system, command)
self.assertEqual(ret, 0, err)
diff --git a/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py b/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py
index 5545869..0098838 100755
--- a/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py
+++ b/tests/functional/arbiter/test_oom_on_client_heal_is_in_progress_arbiter.py
@@ -14,8 +14,6 @@
# 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)
@@ -120,11 +118,11 @@ class ArbiterSelfHealTests(GlusterBaseClass):
mount_obj.client_system, mount_obj.mountpoint)
# Create files
g.log.info('Creating files...')
- command = ("/usr/bin/env python%d %s create_files "
+ command = ("/usr/bin/env python %s create_files "
"-f 1000 "
"--fixed-file-size 10k "
"%s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
diff --git a/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py b/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py
index 2c0490b..06b494e 100644
--- a/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py
+++ b/tests/functional/arbiter/test_remove_faulty_subvol_and_add_new_subvol.py
@@ -14,8 +14,6 @@
# 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)
@@ -120,13 +118,13 @@ class TestArbiterSelfHeal(GlusterBaseClass):
mount_obj.client_system, mount_obj.mountpoint)
# Create dirs with file
g.log.info('Creating dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
"-d 2 "
"-l 2 "
"-n 2 "
"-f 20 "
"%s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
diff --git a/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py b/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py
index b95a977..26c8481 100755
--- a/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py
+++ b/tests/functional/arbiter/test_replacing_all_arbiter_bricks_in_the_volume.py
@@ -14,7 +14,6 @@
# 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
@@ -147,14 +146,9 @@ class TestArbiterSelfHeal(GlusterBaseClass):
mount_obj.client_system, mount_obj.mountpoint)
# Create dirs with file
g.log.info('Creating dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
- "-d 3 "
- "-l 3 "
- "-n 3 "
- "-f 20 "
- "%s" % (
- sys.version_info.major, self.script_upload_path,
- mount_obj.mountpoint))
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
+ "-d 3 -l 3 -n 3 -f 20 %s"
+ % (self.script_upload_path, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
user=mount_obj.user)
diff --git a/tests/functional/disperse/test_ec_add_brick.py b/tests/functional/disperse/test_ec_add_brick.py
index 09b729c..27571e3 100644
--- a/tests/functional/disperse/test_ec_add_brick.py
+++ b/tests/functional/disperse/test_ec_add_brick.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
@@ -13,7 +13,6 @@
# You should have received a copy of the GNU General Public License along
# 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
@@ -83,13 +82,13 @@ class DispersedWithAddBrick(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -150,13 +149,13 @@ class DispersedWithAddBrick(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/disperse/test_ec_fops.py b/tests/functional/disperse/test_ec_fops.py
index a933958..53583f3 100644
--- a/tests/functional/disperse/test_ec_fops.py
+++ b/tests/functional/disperse/test_ec_fops.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2019-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
@@ -19,7 +19,6 @@ Test Description:
Tests File Operations on a healthy EC volume
"""
from os import getcwd
-import sys
from glusto.core import Glusto as g
@@ -250,13 +249,13 @@ class TestFops(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/disperse/test_ec_fops_brickdown.py b/tests/functional/disperse/test_ec_fops_brickdown.py
index f7cac1f..9067144 100644
--- a/tests/functional/disperse/test_ec_fops_brickdown.py
+++ b/tests/functional/disperse/test_ec_fops_brickdown.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2019-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
@@ -20,8 +20,6 @@ Test Description:
brought down
"""
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass, runs_on)
@@ -265,13 +263,13 @@ class TestFopsBrickdown(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s/dir1" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -304,13 +302,13 @@ class TestFopsBrickdown(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s/dir2" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/disperse/test_ec_remove_brick.py b/tests/functional/disperse/test_ec_remove_brick.py
index a5422f2..a41f78c 100644
--- a/tests/functional/disperse/test_ec_remove_brick.py
+++ b/tests/functional/disperse/test_ec_remove_brick.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
@@ -13,7 +13,6 @@
# You should have received a copy of the GNU General Public License along
# 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
@@ -81,13 +80,13 @@ class DispersedWithAddBrick(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -130,13 +129,13 @@ class DispersedWithAddBrick(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/disperse/test_ec_reset.py b/tests/functional/disperse/test_ec_reset.py
index 6b115cc..4b797a0 100644
--- a/tests/functional/disperse/test_ec_reset.py
+++ b/tests/functional/disperse/test_ec_reset.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2018-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,7 +22,6 @@ Test Description:
"""
from os import getcwd
from random import choice
-import sys
from time import sleep
from glusto.core import Glusto as g
@@ -168,9 +167,9 @@ class TestBrickReset(GlusterBaseClass):
# Create dirs with file
g.log.info('Creating dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
"-d 2 -l 2 -n 2 -f 20 %s/dir2" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
@@ -341,9 +340,9 @@ class TestBrickReset(GlusterBaseClass):
mount_obj.client_system, mount_obj.mountpoint)
# Create dirs with file
g.log.info('Creating dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
"-d 2 -l 2 -n 2 -f 20 %s/dir1" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
diff --git a/tests/functional/disperse/test_ec_verify_datacorruption_during_full_heal.py b/tests/functional/disperse/test_ec_verify_datacorruption_during_full_heal.py
index 42f7421..6d91ee0 100644
--- a/tests/functional/disperse/test_ec_verify_datacorruption_during_full_heal.py
+++ b/tests/functional/disperse/test_ec_verify_datacorruption_during_full_heal.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-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
@@ -14,7 +14,6 @@
# 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 time import sleep
from glusto.core import Glusto as g
@@ -123,13 +122,9 @@ class TestHealFullNodeReboot(GlusterBaseClass):
# Create dirs with file
g.log.info('Creating dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
- "-d 2 "
- "-l 2 "
- "-n 2 "
- "-f 20 "
- "%s" % (
- sys.version_info.major, self.script_upload_path,
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
+ "-d 2 -l 2 -n 2 -f 20 %s" % (
+ self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,
diff --git a/tests/functional/disperse/test_ec_verify_full_heal.py b/tests/functional/disperse/test_ec_verify_full_heal.py
index 1ae8738..3051076 100644
--- a/tests/functional/disperse/test_ec_verify_full_heal.py
+++ b/tests/functional/disperse/test_ec_verify_full_heal.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-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
@@ -13,7 +13,6 @@
# You should have received a copy of the GNU General Public License along
# 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
@@ -120,13 +119,9 @@ class TestHealFull(GlusterBaseClass):
mount_obj.client_system, mount_obj.mountpoint)
# Create dirs with file
g.log.info('Creating dirs with file...')
- command = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
- "-d 2 "
- "-l 2 "
- "-n 2 "
- "-f 20 "
- "%s"
- % (sys.version_info.major, self.script_upload_path,
+ command = ("/usr/bin/env python %s create_deep_dirs_with_files "
+ "-d 2 -l 2 -n 2 -f 20 %s"
+ % (self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, command,