Skip to content

Commit

Permalink
[static route] Ignore BGP summary failure
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
The command show ip bgp summary may fail if there are no BGP sessions up. Since static route feature has no dependency on BGP, the test cases should continue even if the command fails.

How did you do it?
Ignore failure on show ip bgp summary command.
  • Loading branch information
shi-su authored Sep 2, 2021
1 parent 5be24c0 commit 6e98e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/route/test_static_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def check_route_redistribution(duthost, prefix, ipv6, removed=False):
SHOW_BGP_SUMMARY_CMD = "show ip bgp summary"
SHOW_BGP_ADV_ROUTES_CMD_TEMPLATE = "show ip bgp neighbor {} advertised-routes"

bgp_summary = duthost.shell(SHOW_BGP_SUMMARY_CMD)["stdout"].split("\n")
bgp_summary = duthost.shell(SHOW_BGP_SUMMARY_CMD, module_ignore_errors=True)["stdout"].split("\n")

bgp_neighbors = []

Expand Down

0 comments on commit 6e98e95

Please sign in to comment.