Skip to content

Commit

Permalink
tests: Fix broken check_ping run_and_expect semantics
Browse files Browse the repository at this point in the history
*again*.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed Jun 29, 2023
1 parent 1ce1c53 commit c65e7e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/topotests/bgp_vpnv4_asbr/test_bgp_vpnv4_asbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ def _check(name, dest_addr, match):
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))
Expand Down

0 comments on commit c65e7e7

Please sign in to comment.