mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 15:47:22 +00:00
Merge pull request #13879 from donaldsharp/fix_check_ping_again
tests: Fix broken check_ping run_and_expect semantics
This commit is contained in:
commit
c8732b6904
@ -250,7 +250,8 @@ def check_ping(name, dest_addr, expect_connected):
|
||||
tgen = get_topogen()
|
||||
output = tgen.gears[name].run("ping {} -c 1 -w 1".format(dest_addr))
|
||||
logger.info(output)
|
||||
assert match in output, "ping fail"
|
||||
if match not in output:
|
||||
return "ping fail"
|
||||
|
||||
match = ", {} packet loss".format("0%" if expect_connected else "100%")
|
||||
logger.info("[+] check {} {} {}".format(name, dest_addr, match))
|
||||
|
Loading…
Reference in New Issue
Block a user