tests: Standardise on DockerizedSshDaemon.host & .port
This commit is contained in:
parent
c45b13bee3
commit
9859e44ee8
|
@ -68,7 +68,7 @@ class SshTest(testlib.DockerMixin, testlib.TestCase):
|
|||
password='has_sudo_password',
|
||||
)
|
||||
name = 'ssh.%s:%s' % (
|
||||
self.dockerized_ssh.get_host(),
|
||||
self.dockerized_ssh.host,
|
||||
self.dockerized_ssh.port,
|
||||
)
|
||||
self.assertEqual(name, context.name)
|
||||
|
@ -186,7 +186,7 @@ class BannerTest(testlib.DockerMixin, testlib.TestCase):
|
|||
ssh_debug_level=3,
|
||||
)
|
||||
name = 'ssh.%s:%s' % (
|
||||
self.dockerized_ssh.get_host(),
|
||||
self.dockerized_ssh.host,
|
||||
self.dockerized_ssh.port,
|
||||
)
|
||||
self.assertEqual(name, context.name)
|
||||
|
|
|
@ -574,14 +574,11 @@ class DockerizedSshDaemon(object):
|
|||
|
||||
self.image = image_template % d
|
||||
self.start_container()
|
||||
self.host = self.get_host()
|
||||
self.host = get_docker_host()
|
||||
self.port = self.get_port(self.container_name)
|
||||
|
||||
def get_host(self):
|
||||
return get_docker_host()
|
||||
|
||||
def wait_for_sshd(self):
|
||||
wait_for_port(self.get_host(), self.port, pattern='OpenSSH')
|
||||
wait_for_port(self.host, self.port, pattern='OpenSSH')
|
||||
|
||||
def check_processes(self):
|
||||
# Get Accounting name (ucomm) & command line (args) of each process
|
||||
|
|
Loading…
Reference in New Issue