Skip to content

Commit 6e98e95

Browse files
authored
[static route] Ignore BGP summary failure
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.
1 parent 5be24c0 commit 6e98e95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/route/test_static_route.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def check_route_redistribution(duthost, prefix, ipv6, removed=False):
125125
SHOW_BGP_SUMMARY_CMD = "show ip bgp summary"
126126
SHOW_BGP_ADV_ROUTES_CMD_TEMPLATE = "show ip bgp neighbor {} advertised-routes"
127127

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

130130
bgp_neighbors = []
131131

0 commit comments

Comments
 (0)