From d41b60404d4098ef6ca965be89d500499d83319c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 9 Jul 2021 11:25:59 -0400 Subject: [PATCH] qa/tasks/cephfs/test_nfs: define NFS_POOL_NAME We can't import from mgr_module.py from here, sadly. Signed-off-by: Sage Weil --- qa/tasks/cephfs/test_nfs.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qa/tasks/cephfs/test_nfs.py b/qa/tasks/cephfs/test_nfs.py index cf08f88d4e37e..0b690cd662a89 100644 --- a/qa/tasks/cephfs/test_nfs.py +++ b/qa/tasks/cephfs/test_nfs.py @@ -10,6 +10,7 @@ from teuthology.exceptions import CommandFailedError log = logging.getLogger(__name__) +NFS_POOL_NAME = '.nfs' # should match mgr_module.py # TODO Add test for cluster update when ganesha can be deployed on multiple ports. class TestNFS(MgrTestCase): @@ -161,7 +162,7 @@ class TestNFS(MgrTestCase): self._cmd(*export_cmd) # Check if user id for export is created self._check_auth_ls(export_id, check_in=True) - res = self._sys_cmd(['rados', '-p', '.nfs', '-N', self.cluster_id, 'get', + res = self._sys_cmd(['rados', '-p', NFS_POOL_NAME, '-N', self.cluster_id, 'get', f'export-{export_id}', '-']) # Check if export object is created if res == b'': @@ -233,7 +234,7 @@ class TestNFS(MgrTestCase): Test if export or config object are deleted successfully. :param conf_obj: It denotes config object needs to be checked ''' - rados_obj_ls = self._sys_cmd(['rados', '-p', '.nfs', '-N', self.cluster_id, 'ls']) + rados_obj_ls = self._sys_cmd(['rados', '-p', NFS_POOL_NAME, '-N', self.cluster_id, 'ls']) if b'export-' in rados_obj_ls or (conf_obj and b'conf-nfs' in rados_obj_ls): self.fail("Delete export failed") @@ -480,7 +481,7 @@ class TestNFS(MgrTestCase): ''' self._test_create_cluster() - pool = '.nfs' + pool = NFS_POOL_NAME user_id = 'test' fs_name = 'user_test_fs' pseudo_path = '/ceph' @@ -519,7 +520,7 @@ class TestNFS(MgrTestCase): self.assertEqual(config, res.decode('utf-8')) self._test_mnt(pseudo_path, port, ip) self._nfs_cmd('cluster', 'config', 'reset', self.cluster_id) - rados_obj_ls = self._sys_cmd(['rados', '-p', '.nfs', '-N', self.cluster_id, 'ls']) + rados_obj_ls = self._sys_cmd(['rados', '-p', NFS_POOL_NAME, '-N', self.cluster_id, 'ls']) if b'conf-nfs' not in rados_obj_ls and b'userconf-nfs' in rados_obj_ls: self.fail("User config not deleted") time.sleep(30) -- 2.39.5