From 3e6d5bdc8c45ac3b726ca3b7237e43194805cc56 Mon Sep 17 00:00:00 2001 From: kshithijiyer Date: Thu, 20 Feb 2020 12:25:15 +0530 Subject: [Testfix] Remove python version dependency(Part 3) Please refer to commit message of patch [1]. [1] https://review.gluster.org/#/c/glusto-tests/+/24140/ Change-Id: Ib357d5690bb28131d788073b80a088647167fe80 Signed-off-by: kshithijiyer --- tests/functional/nfs_ganesha/test_ganesha_add_brick.py | 8 +++----- .../functional/nfs_ganesha/test_ganesha_replace_brick.py | 8 +++----- .../nfs_ganesha/test_new_mount_while_io_in_progress.py | 9 +++------ .../nfs_ganesha/test_new_volume_while_io_in_progress.py | 8 +++----- tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py | 9 +++------ .../nfs_ganesha/test_nfs_ganesha_volume_exports.py | 15 +++++++-------- 6 files changed, 22 insertions(+), 35 deletions(-) (limited to 'tests/functional/nfs_ganesha') diff --git a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py index 20252359f..946b64c3b 100644 --- a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py +++ b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2019 Red Hat, Inc. +# Copyright (C) 2018-2020 Red Hat, Inc. # # 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,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.nfs_ganesha_libs import NfsGaneshaClusterSetupClass @@ -91,13 +89,13 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass): 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/nfs_ganesha/test_ganesha_replace_brick.py b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py index 68b2ed997..12cec1a74 100644 --- a/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py +++ b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2019 Red Hat, Inc. +# Copyright (C) 2018-2020 Red Hat, Inc. # # 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,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.nfs_ganesha_libs import NfsGaneshaClusterSetupClass @@ -92,13 +90,13 @@ class TestGaneshaReplaceBrick(NfsGaneshaClusterSetupClass): 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/nfs_ganesha/test_new_mount_while_io_in_progress.py b/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py index 6f99db59d..1c6fc313c 100644 --- a/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py +++ b/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2019 Red Hat, Inc. +# Copyright (C) 2018-2020 Red Hat, Inc. # # 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,10 +14,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from copy import deepcopy -import sys - from glusto.core import Glusto as g - from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass from glustolibs.gluster.gluster_base_class import runs_on from glustolibs.gluster.exceptions import ExecutionError @@ -103,13 +100,13 @@ class TestMountWhileIoInProgress(NfsGaneshaClusterSetupClass): # Start IO g.log.info("Starting IO on %s:%s", mount_object.client_system, mount_object.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, + self.script_upload_path, dirname_start_num, mount_object.mountpoint)) proc = g.run_async(mount_object.client_system, cmd, user=mount_object.user) diff --git a/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py b/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py index 083ebb1ce..c367d3006 100644 --- a/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py +++ b/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2019 Red Hat, Inc. +# Copyright (C) 2018-2020 Red Hat, Inc. # # 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,8 +19,6 @@ IO is in progress on another volume """ from copy import deepcopy -import sys - from glusto.core import Glusto as g from glustolibs.gluster.nfs_ganesha_libs import ( @@ -98,13 +96,13 @@ class TestNewVolumeWhileIoInProgress(NfsGaneshaClusterSetupClass): 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/nfs_ganesha/test_nfs_ganesha_sanity.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py index 53b069e01..2bca6d1c9 100755 --- a/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py +++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2018 Red Hat, Inc. +# Copyright (C) 2017-2020 Red Hat, Inc. # # 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 @@ -17,9 +17,6 @@ """ Description: Test Cases in this module test NFS-Ganesha Sanity. """ - -import sys - from glusto.core import Glusto as g from glustolibs.gluster.gluster_base_class import runs_on @@ -107,13 +104,13 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass): 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/nfs_ganesha/test_nfs_ganesha_volume_exports.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py index 700bd0ffe..8c90f953d 100755 --- a/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py +++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2017 Red Hat, Inc. +# Copyright (C) 2016-2020 Red Hat, Inc. # # 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 @@ from copy import deepcopy import os import re -import sys from time import sleep from glusto.core import Glusto as g @@ -261,13 +260,13 @@ class TestNfsGaneshaVolumeExportsWithIO(NfsGaneshaClusterSetupClass): 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) @@ -400,13 +399,13 @@ class TestNfsGaneshaMultiVolumeExportsWithIO(NfsGaneshaClusterSetupClass): 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) @@ -569,13 +568,13 @@ class TestNfsGaneshaSubDirExportsWithIO(NfsGaneshaClusterSetupClass): g.log.info("Starting IO on all mounts.") self.all_mounts_procs = [] for mount_obj in mount_objs: - 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 15 " "--max-num-of-dirs 5 " "--num-of-files 10 %s" % ( - sys.version_info.major, self.script_upload_path, + self.script_upload_path, self.dir_start, mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) -- cgit