From: Rishabh Dave Date: Wed, 24 Jul 2019 07:02:07 +0000 (+0530) Subject: test_cephfs_shell: allow cmd as list too X-Git-Tag: v15.1.0~1555^2~18 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f0723d200c88816d54ea57c742a2377e4c813707;p=ceph.git test_cephfs_shell: allow cmd as list too Convert cmd to string if it is passed as list to run_cephfs_shell_cmd(). Allowing cmd to be list would be nice since elsewhere, in tests, command to be executed must be a list of arguments rather than string of arguments separated by spaces. Signed-off-by: Rishabh Dave --- diff --git a/qa/tasks/cephfs/test_cephfs_shell.py b/qa/tasks/cephfs/test_cephfs_shell.py index 1584af20af1..a0b56d3b777 100644 --- a/qa/tasks/cephfs/test_cephfs_shell.py +++ b/qa/tasks/cephfs/test_cephfs_shell.py @@ -27,6 +27,9 @@ class TestCephFSShell(CephFSTestCase): if mount_x is None: mount_x = self.mount_a + if isinstance(cmd, list): + cmd = " ".join(cmd) + args = ["cephfs-shell", "-c", mount_x.config_path] if opts is not None: args.extend(opts)