]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test_cephfs_shell: add a new method to return script output
authorRishabh Dave <ridave@redhat.com>
Thu, 25 Jul 2019 05:21:28 +0000 (10:51 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 25 Jul 2019 05:21:28 +0000 (10:51 +0530)
Add a new method that runs the given CephFS shell script on the given
mount and returns the output with whitespace removed.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/test_cephfs_shell.py

index ab267e521847416b82e470cc475758943a155f0b..8f3d7c398c717f1aa844de9309128f193b5f6d3b 100644 (file)
@@ -24,6 +24,10 @@ class TestCephFSShell(CephFSTestCase):
                                                 stdin=stdin)
         return status.stdout.getvalue().strip()
 
+    def get_cephfs_shell_script_output(self, script, mount_x=None, stdin=None):
+        return self.run_cephfs_shell_script(script, mount_x, stdin).stdout.\
+            getvalue().strip()
+
     def run_cephfs_shell_script(self, script, mount_x=None, stdin=None):
         if mount_x is None:
             mount_x = self.mount_a