summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/bgp_router_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario_test/bgp_router_test.py')
-rw-r--r--test/scenario_test/bgp_router_test.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py
index 1a92a1b3..7d93ba53 100644
--- a/test/scenario_test/bgp_router_test.py
+++ b/test/scenario_test/bgp_router_test.py
@@ -59,21 +59,17 @@ class GoBGPTestBase(unittest.TestCase):
qs = [q1, q2, q3]
ctns = [g1, q1, q2, q3]
- # advertise a route from q1, q2, q3
- for idx, q in enumerate(qs):
- route = '10.0.{0}.0/24'.format(idx + 1)
- q.add_route(route)
-
initial_wait_time = max(ctn.run() for ctn in ctns)
-
time.sleep(initial_wait_time)
for q in qs:
- g1.add_peer(q, reload_config=False, passwd='passwd')
+ g1.add_peer(q, passwd='passwd')
q.add_peer(g1, passwd='passwd', passive=True)
- g1.create_config()
- g1.reload_config()
+ # advertise a route from q1, q2, q3
+ for idx, q in enumerate(qs):
+ route = '10.0.{0}.0/24'.format(idx + 1)
+ q.add_route(route)
cls.gobgp = g1
cls.quaggas = {'q1': q1, 'q2': q2, 'q3': q3}
@@ -145,14 +141,14 @@ class GoBGPTestBase(unittest.TestCase):
def test_05_add_quagga(self):
q4 = QuaggaBGPContainer(name='q4', asn=65004, router_id='192.168.0.5')
self.quaggas['q4'] = q4
-
- q4.add_route('10.0.4.0/24')
-
initial_wait_time = q4.run()
time.sleep(initial_wait_time)
+
self.gobgp.add_peer(q4)
q4.add_peer(self.gobgp)
+ q4.add_route('10.0.4.0/24')
+
self.gobgp.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=q4)
def test_06_check_global_rib(self):