Commit 25f4d4d9 authored by chrissi^'s avatar chrissi^
Browse files

test_good_running_ssh: Use RemoteNetworkInterface to get ifname

parent 54f4e635
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment