Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #173 from ishidawataru/master
Browse files Browse the repository at this point in the history
Support checking BGP daemon status from multiple choices
  • Loading branch information
tomdee authored Dec 6, 2016
2 parents 394c8b1 + bc0cc06 commit 96a0e62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion calico_test/tests/st/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,17 @@ def check_bird_status(host, expected):
if len(columns) != 7:
continue

if type(state) is not list:
state = [state]

# Find the entry matching this peer.
if columns[1] == ipaddr and columns[2] == peertype:

# Check that the connection state is as expected. We check
# that the state starts with the expected value since there
# may be additional diagnostic information included in the
# info field.
if columns[5].startswith(state):
if any(columns[5].startswith(s) for s in state):
break
else:
msg = "Error in BIRD status for peer %s:\n" \
Expand Down

0 comments on commit 96a0e62

Please sign in to comment.