From: Rishabh Dave Date: Thu, 25 Jul 2019 05:21:28 +0000 (+0530) Subject: test_cephfs_shell: add a new method to return script output X-Git-Tag: v15.1.0~2061^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2a98e9cb31fa36696885047427e86c4a9fe0c65e;p=ceph-ci.git test_cephfs_shell: add a new method to return script output 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 --- diff --git a/qa/tasks/cephfs/test_cephfs_shell.py b/qa/tasks/cephfs/test_cephfs_shell.py index ab267e52184..8f3d7c398c7 100644 --- a/qa/tasks/cephfs/test_cephfs_shell.py +++ b/qa/tasks/cephfs/test_cephfs_shell.py @@ -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