From e62dbb2f1e410a7632b5d13a1e304ce8fe3b1632 Mon Sep 17 00:00:00 2001 From: sayaleeraut Date: Fri, 1 Feb 2019 16:50:26 +0530 Subject: [TestFix] DHT Tests - Remove NFS protocol Scenarios: 1 - Rename directory when destination is not present 2 - Rename directory when destination is present The TC was failing when the volume was mounted using NFS at validate_files_in_dir() because the method uses 'trusted.glusterfs.pathinfo' on the mount, which is a glusterfs specific xattr. When the volume is mounted using NFS, it cannot find the xattr and hence it failed. Change-Id: Ic61de773525e717a73178a4694c015276da2a688 Signed-off-by: sayaleeraut --- tests/functional/dht/test_rename_directory.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'tests/functional/dht') diff --git a/tests/functional/dht/test_rename_directory.py b/tests/functional/dht/test_rename_directory.py index ef2eae258..3486bbf8b 100644 --- a/tests/functional/dht/test_rename_directory.py +++ b/tests/functional/dht/test_rename_directory.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 @@ -34,13 +34,14 @@ from glustolibs.gluster.glusterfile import file_exists, move_file @runs_on([['distributed-replicated', 'replicated', 'distributed', - 'dispersed', 'distributed-dispersed'], - ['glusterfs', 'nfs']]) + 'dispersed', 'distributed-dispersed', 'arbiter', + 'distributed-arbiter'], + ['glusterfs']]) class TestDHTRenameDirectory(GlusterBaseClass): """DHT Tests - rename directory Scenarios: - 1 - Rename directory when destination is not presented - 2 - Rename directory when destination is presented + 1 - Rename directory when destination is not present + 2 - Rename directory when destination is present """ def setUp(self): @@ -97,8 +98,7 @@ class TestDHTRenameDirectory(GlusterBaseClass): return True def test_rename_directory_no_destination_folder(self): - """Test rename directory with no destination folder - """ + """Test rename directory with no destination folder""" dirs = { 'initial': '{root}/folder_{client_index}', 'new_folder': '{root}/folder_renamed{client_index}' @@ -107,7 +107,6 @@ class TestDHTRenameDirectory(GlusterBaseClass): for mount_index, mount_obj in enumerate(self.mounts): client_host = mount_obj.client_system mountpoint = mount_obj.mountpoint - initial_folder = dirs['initial'].format( root=mount_obj.mountpoint, client_index=mount_index @@ -125,6 +124,7 @@ class TestDHTRenameDirectory(GlusterBaseClass): self.assertTrue(file_exists(client_host, initial_folder)) g.log.info('Created source directory %s on mount point %s', initial_folder, mountpoint) + # Create files and directories ret = self.create_files(client_host, initial_folder, self.files, content='Textual content') @@ -135,7 +135,7 @@ class TestDHTRenameDirectory(GlusterBaseClass): ret = validate_files_in_dir(client_host, mountpoint, test_type=FILE_ON_HASHED_BRICKS) self.assertTrue(ret, "Expected - Files and dirs are stored " - "on hashed bricks") + "on hashed bricks") g.log.info('Files and dirs are stored on hashed bricks') new_folder_name = dirs['new_folder'].format( @@ -237,8 +237,9 @@ class TestDHTRenameDirectory(GlusterBaseClass): ret = validate_files_in_dir(client_host, mountpoint, test_type=FILE_ON_HASHED_BRICKS) self.assertTrue(ret, "Expected - Files and dirs are stored " - "on hashed bricks") + "on hashed bricks") g.log.info('Files and dirs are stored on hashed bricks') + # Rename source folder to destination ret = move_file(client_host, initial_folder, new_folder_name) -- cgit