diff options
Diffstat (limited to 'test/scenario_test')
-rw-r--r-- | test/scenario_test/route_server_test2.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/scenario_test/route_server_test2.py b/test/scenario_test/route_server_test2.py index 73f106a8..e60e264e 100644 --- a/test/scenario_test/route_server_test2.py +++ b/test/scenario_test/route_server_test2.py @@ -47,23 +47,21 @@ class GoBGPTestBase(unittest.TestCase): g2 = GoBGPContainer(name='g2', asn=65001, router_id='192.168.0.2', ctn_image_name=gobgp_ctn_image_name) e1 = ExaBGPContainer(name='e1', asn=65002, router_id='192.168.0.3') - ctns = [g1, g2, e1] - # advertise a route from route-server-clients - cls.clients = {} - for idx, cli in enumerate((g2, e1)): - route = '10.0.{0}.0/24'.format(idx) - cli.add_route(route) - cls.clients[cli.name] = cli + ctns = [g1, g2, e1] + cls.clients = {cli.name: cli for cli in (g2, e1)} initial_wait_time = max(ctn.run() for ctn in ctns) - time.sleep(initial_wait_time) - for cli in cls.clients.itervalues(): + for cli in cls.clients.values(): g1.add_peer(cli, is_rs_client=True, passwd='passwd', passive=True, prefix_limit=10) cli.add_peer(g1, passwd='passwd') + # advertise a route from route-server-clients + g2.add_route('10.0.0.0/24') + e1.add_route('10.0.1.0/24') + cls.gobgp = g1 # test each neighbor state is turned establish |