]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_cephfs_shell: allow cmd as list too
authorRishabh Dave <ridave@redhat.com>
Wed, 24 Jul 2019 07:02:07 +0000 (12:32 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 13 Sep 2019 05:14:39 +0000 (10:44 +0530)
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 <ridave@redhat.com>
qa/tasks/cephfs/test_cephfs_shell.py

index 1584af20af13a9dbf9ca6d0df8090b7c225af61d..a0b56d3b77715da3ab485d10ffc0f4f2684a16f1 100644 (file)
@@ -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)