Merge pull request #587 from katlapinka/rm-passwd
Remove password from example DUT config and add authentication exception handling
This commit is contained in:
commit
fb86060592
@ -1,10 +1,10 @@
|
|||||||
# DUT type should be either "local" or "ssh"
|
# 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"
|
type: "local"
|
||||||
|
|
||||||
# ip: "x.x.x.x"
|
# ip: "x.x.x.x"
|
||||||
# user: "example_user"
|
# user: "example_user"
|
||||||
# password: "example_password"
|
|
||||||
|
|
||||||
# env: "HTTPS_PROXY=myproxy.example:12345"
|
# env: "HTTPS_PROXY=myproxy.example:12345"
|
||||||
# reboot_timeout: 1800 #timeout value in seconds
|
# reboot_timeout: 1800 #timeout value in seconds
|
||||||
|
@ -8,6 +8,7 @@ import sys
|
|||||||
import traceback
|
import traceback
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
import paramiko
|
||||||
import pytest
|
import pytest
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
@ -61,6 +62,8 @@ def pytest_runtest_setup(item):
|
|||||||
TestRun.presetup()
|
TestRun.presetup()
|
||||||
try:
|
try:
|
||||||
TestRun.executor.wait_for_connection(timedelta(seconds=20))
|
TestRun.executor.wait_for_connection(timedelta(seconds=20))
|
||||||
|
except paramiko.AuthenticationException:
|
||||||
|
raise
|
||||||
except Exception:
|
except Exception:
|
||||||
try:
|
try:
|
||||||
TestRun.plugin_manager.get_plugin('power_control').power_cycle()
|
TestRun.plugin_manager.get_plugin('power_control').power_cycle()
|
||||||
|
Loading…
Reference in New Issue
Block a user