From 3352b58d30a2806463943a000b8d52a958a5e55d Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 9 May 2014 11:30:13 -0500 Subject: [PATCH] Use Remote.shortname in logs Signed-off-by: Zack Cerza --- teuthology/orchestra/remote.py | 2 +- teuthology/orchestra/test/test_remote.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index 63fce9ddca..88a53f81f1 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -104,7 +104,7 @@ class Remote(object): TODO refactor to move run.run here? """ - r = self._runner(client=self.ssh, name=self.hostname, **kwargs) + r = self._runner(client=self.ssh, name=self.shortname, **kwargs) r.remote = self return r diff --git a/teuthology/orchestra/test/test_remote.py b/teuthology/orchestra/test/test_remote.py index 663009b2e4..e52a2f7a2f 100644 --- a/teuthology/orchestra/test/test_remote.py +++ b/teuthology/orchestra/test/test_remote.py @@ -41,13 +41,13 @@ class TestRemote(object): exitstatus=None, exited=None, ) + r = remote.Remote(name='jdoe@xyzzy.example.com', ssh=ssh) run.expects_call().with_args( client=fudge.inspector.arg.passes_test(lambda v: v is ssh), args=fudge.inspector.arg.passes_test(lambda v: v is args), foo=fudge.inspector.arg.passes_test(lambda v: v is foo), - name='xyzzy.example.com' + name=r.shortname, ).returns(ret) - r = remote.Remote(name='jdoe@xyzzy.example.com', ssh=ssh) # monkey patch ook ook r._runner = run got = r.run( -- 2.39.5