From 1409d59294a76a8823962710e2bfb2d60a77cfcd Mon Sep 17 00:00:00 2001 From: Dhairya Parmar Date: Wed, 2 Aug 2023 16:10:18 +0530 Subject: [PATCH] qa: pass arg as list to fix test case failure Pacific branch's run_cluster_cmd() code can't split string into a list, and because backporting is too tricky as a lot of qa code doesn't reach pacific, it would be tedious to backport the PRs that enabled passing string as arg to run_cluster_cmd() in ceph_manager.py. For complete details please checkout note #13 in the tracker attached below. Fixes: https://tracker.ceph.com/issues/61732 Signed-off-by: Dhairya Parmar --- qa/tasks/cephfs/test_nfs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephfs/test_nfs.py b/qa/tasks/cephfs/test_nfs.py index c144005206c2..61dce16f8dd9 100644 --- a/qa/tasks/cephfs/test_nfs.py +++ b/qa/tasks/cephfs/test_nfs.py @@ -22,7 +22,7 @@ class TestNFS(MgrTestCase): return self._cmd("nfs", *args) def _nfs_complete_cmd(self, cmd): - return self.mgr_cluster.mon_manager.run_cluster_cmd(args=f"nfs {cmd}", + return self.mgr_cluster.mon_manager.run_cluster_cmd(args=["nfs"] + cmd, stdout=StringIO(), stderr=StringIO(), check_status=False) @@ -150,8 +150,8 @@ class TestNFS(MgrTestCase): try: # Disable any running nfs ganesha daemon self._check_nfs_server_status() - cluster_create = self._nfs_complete_cmd( - f'cluster create {self.cluster_id}') + cmd = ["cluster", "create", self.cluster_id] + cluster_create = self._nfs_complete_cmd(cmd) if cluster_create.stderr and 'cluster already exists' \ in cluster_create.stderr.getvalue(): self._test_delete_cluster() -- 2.47.3