]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: pass arg as list to fix test case failure 52763/head
authorDhairya Parmar <dparmar@redhat.com>
Wed, 2 Aug 2023 10:40:18 +0000 (16:10 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Wed, 16 Aug 2023 08:53:34 +0000 (14:23 +0530)
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 <dparmar@redhat.com>
qa/tasks/cephfs/test_nfs.py

index c144005206c219c5e00ace969d561f84d2cfbfdd..61dce16f8dd9ed8f88b75f3fc62bdef61cc99f83 100644 (file)
@@ -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()