From: Radoslaw Zarzynski Date: Tue, 22 Aug 2017 17:30:39 +0000 (+0200) Subject: RemoteProcess: add an unit test for the cwd parameter. X-Git-Tag: 1.1.0~397^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1093%2Fhead;p=teuthology.git RemoteProcess: add an unit test for the cwd parameter. Signed-off-by: Radoslaw Zarzynski --- diff --git a/teuthology/orchestra/test/test_run.py b/teuthology/orchestra/test/test_run.py index 8b9b7c0c5..c14a148e0 100644 --- a/teuthology/orchestra/test/test_run.py +++ b/teuthology/orchestra/test/test_run.py @@ -86,6 +86,15 @@ class TestRun(object): ) assert proc.exitstatus == 0 + def test_run_cwd(self): + self.m_stdout_buf.channel.recv_exit_status.return_value = 0 + run.run( + client=self.m_ssh, + args=['foo_bar_baz'], + cwd='/cwd/test', + ) + self.m_ssh.exec_command.assert_called_with('(cd /cwd/test && exec foo_bar_baz)') + def test_capture_stdout(self): output = 'foo\nbar' set_buffer_contents(self.m_stdout_buf, output)