Merge pull request #587 from katlapinka/rm-passwd

Remove password from example DUT config and add authentication exception handling
This commit is contained in:
Robert Baldyga 2020-12-03 14:33:26 +01:00 committed by GitHub
commit fb86060592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# DUT type should be either "local" or "ssh"
# if ssh is selected, then ip, user and password fields are required
# if ssh is selected, then ip and user fields are required and you have to make sure you have
# enabled SSH key-based authentication to the machine with given ip address
type: "local"
# ip: "x.x.x.x"
# user: "example_user"
# password: "example_password"
# env: "HTTPS_PROXY=myproxy.example:12345"
# reboot_timeout: 1800 #timeout value in seconds

View File

@ -8,6 +8,7 @@ import sys
import traceback
from datetime import timedelta
import paramiko
import pytest
import yaml
@ -61,6 +62,8 @@ def pytest_runtest_setup(item):
TestRun.presetup()
try:
TestRun.executor.wait_for_connection(timedelta(seconds=20))
except paramiko.AuthenticationException:
raise
except Exception:
try:
TestRun.plugin_manager.get_plugin('power_control').power_cycle()