From f0723d200c88816d54ea57c742a2377e4c813707 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 24 Jul 2019 12:32:07 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/test_cephfs_shell.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.39.5