Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ffbs
ffbs-ci
Commits
25f4d4d9
Commit
25f4d4d9
authored
May 19, 2021
by
chrissi^
Browse files
test_good_running_ssh: Use RemoteNetworkInterface to get ifname
parent
54f4e635
Changes
1
Hide whitespace changes
Inline
Side-by-side
parker/test_parker.py
View file @
25f4d4d9
...
...
@@ -116,7 +116,16 @@ def test_transition_to_running_mode(in_good_running):
@
pytest
.
mark
.
flaky
(
reruns
=
10
,
reruns_delay
=
10
)
def
test_good_running_ssh
(
target
,
in_good_running
,
config
,
command
):
ip
=
ipv6_link_local
(
command
)
r
=
subprocess
.
run
([
"ssh"
,
"-o"
,
"UserKnownHostsFile=/dev/null"
,
"-o"
,
"StrictHostKeyChecking=no"
,
"-o"
,
"PreferredAuthentications=publickey"
,
"-i"
,
config
[
"ssh_key_file"
],
'root@{}%dut'
.
format
(
ip
),
"echo 1"
])
ifname
=
target
.
get_resource
(
"RemoteNetworkInterface"
).
ifname
r
=
subprocess
.
run
([
"ssh"
,
"-o"
,
"UserKnownHostsFile=/dev/null"
,
"-o"
,
"StrictHostKeyChecking=no"
,
"-o"
,
"PreferredAuthentications=publickey"
,
"-i"
,
config
[
"ssh_key_file"
],
'root@{}%{}'
.
format
(
ip
,
ifname
),
"echo 1"
])
assert
r
.
returncode
==
0
,
"SSH connection during run mode failed"
@
pytest
.
mark
.
running_mode
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment