Add timeout to check_connectivity method
Especially for negative tests, when connectivity loss is expected, allowing the definition of a lower SSH timeout is needed, since default value of 300 seconds is too high Change-Id: Ifc9bc6c60d5d44e5524f6e1338eb3ceeb0a900a9
This commit is contained in:
parent
589f3b95dd
commit
3eb1228cc6
|
@ -259,8 +259,10 @@ class BaseTempestTestCase(base_api.BaseNetworkTest):
|
|||
'server']['id'])['ports'][0]
|
||||
self.fip = self.create_floatingip(port=self.port)
|
||||
|
||||
def check_connectivity(self, host, ssh_user, ssh_key, servers=None):
|
||||
ssh_client = ssh.Client(host, ssh_user, pkey=ssh_key)
|
||||
def check_connectivity(self, host, ssh_user, ssh_key,
|
||||
servers=None, ssh_timeout=None):
|
||||
ssh_client = ssh.Client(host, ssh_user,
|
||||
pkey=ssh_key, timeout=ssh_timeout)
|
||||
try:
|
||||
ssh_client.test_connection_auth()
|
||||
except lib_exc.SSHTimeout as ssh_e:
|
||||
|
|
Loading…
Reference in New Issue