Skip to content

Commit

Permalink
Merge pull request projectcalico#125 from caseydavenport/check-bgp-peers
Browse files Browse the repository at this point in the history
Additional assertion on BGP peering state
  • Loading branch information
caseydavenport authored Dec 6, 2018
2 parents d918787 + e0a3676 commit 9dac9c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/st/bgp/test_single_route_reflector.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from tests.st.test_base import TestBase
from tests.st.utils.docker_host import DockerHost, CLUSTER_STORE_DOCKER_OPTIONS
from tests.st.utils.route_reflector import RouteReflectorCluster
from tests.st.utils.utils import update_bgp_config
from tests.st.utils.utils import update_bgp_config, check_bird_status, retry_until_success

from .peer import create_bgp_peer

Expand Down Expand Up @@ -62,6 +62,10 @@ def _test_single_route_reflector(self, backend='bird', bgpconfig_as_num=64514, p
create_bgp_peer(host1, "global", rg[0].ip, peer_as_num)

# Allow network to converge (which it now will).
retry_until_success(host1.assert_is_ready, retries=30, felix=False)
retry_until_success(host2.assert_is_ready, retries=30, felix=False)
check_bird_status(host1, [("global", rg[0].ip, "Established")])
check_bird_status(host2, [("global", rg[0].ip, "Established")])
self.assert_true(workload_host1.check_can_ping(workload_host2.ip, retries=20))

# And check connectivity in both directions.
Expand Down
3 changes: 1 addition & 2 deletions tests/st/utils/route_reflector.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
# limitations under the License.

import os
from docker_host import DockerHost, CHECKOUT_DIR
from utils import get_ip, ETCD_CA, ETCD_CERT, ETCD_KEY, ETCD_HOSTNAME_SSL
from docker_host import DockerHost

from netaddr import IPAddress

Expand Down

0 comments on commit 9dac9c7

Please sign in to comment.