Use Remote.shortname in logs

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
Zack Cerza 2014-05-09 11:30:13 -05:00
parent 30d1d518d5
commit 3352b58d30
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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(