@@ -38,7 +38,7 @@ def test_console_reversessh_connectivity(duthost, creds, target_line):
38
38
client .sendcontrol ('a' )
39
39
client .sendcontrol ('x' )
40
40
except Exception as e :
41
- pytest .fail ("Not able to do reverse SSH to remote host via DUT" )
41
+ pytest .fail ("Not able to do reverse SSH to remote host via DUT: {}" . format ( e ) )
42
42
43
43
pytest_assert (
44
44
wait_until (10 , 1 , 0 , check_target_line_status , duthost , target_line , "IDLE" ),
@@ -69,13 +69,13 @@ def test_console_reversessh_force_interrupt(duthost, creds, target_line):
69
69
check_target_line_status (duthost , target_line , "BUSY" ),
70
70
"Target line {} is idle while reverse SSH session is up" .format (target_line ))
71
71
except Exception as e :
72
- pytest .fail ("Not able to do reverse SSH to remote host via DUT" )
72
+ pytest .fail ("Not able to do reverse SSH to remote host via DUT: {}" . format ( e ) )
73
73
74
74
try :
75
75
# Force clear line from DUT
76
76
duthost .shell ('sudo sonic-clear line {}' .format (target_line ))
77
77
except Exception as e :
78
- pytest .fail ("Not able to do clear line for DUT" )
78
+ pytest .fail ("Not able to do clear line for DUT: {}" . format ( e ) )
79
79
80
80
# Check the session ended within 5s and the line state is idle
81
81
pytest_assert (
@@ -85,7 +85,7 @@ def test_console_reversessh_force_interrupt(duthost, creds, target_line):
85
85
try :
86
86
client .expect ("Picocom was killed" )
87
87
except Exception as e :
88
- pytest .fail ("Console session not exit correctly: {}" .format (str ( e ) ))
88
+ pytest .fail ("Console session not exit correctly: {}" .format (e ))
89
89
90
90
def check_target_line_status (duthost , line , expect_status ):
91
91
console_facts = duthost .console_facts ()['ansible_facts' ]['console_facts' ]
0 commit comments