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

Commit 96a0e62

Browse files
authored
Merge pull request #173 from ishidawataru/master
Support checking BGP daemon status from multiple choices
2 parents 394c8b1 + bc0cc06 commit 96a0e62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

calico_test/tests/st/utils/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,17 @@ def check_bird_status(host, expected):
167167
if len(columns) != 7:
168168
continue
169169

170+
if type(state) is not list:
171+
state = [state]
172+
170173
# Find the entry matching this peer.
171174
if columns[1] == ipaddr and columns[2] == peertype:
172175

173176
# Check that the connection state is as expected. We check
174177
# that the state starts with the expected value since there
175178
# may be additional diagnostic information included in the
176179
# info field.
177-
if columns[5].startswith(state):
180+
if any(columns[5].startswith(s) for s in state):
178181
break
179182
else:
180183
msg = "Error in BIRD status for peer %s:\n" \

0 commit comments

Comments
 (0)