From 3c377d437d9380111fb61bd0dc441eaf4e2c5209 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Thu, 2 Jun 2016 15:48:31 +0000 Subject: server: fix another regression of active connection Another regression introduced by 4c9cd88c61cb848e36a45657b7cbc63b9c783dc4 Previous fix (81bc3851b2c1f112f157b98a3cf60757a199a31a) fixes active connection of neighbors configured via configuration file. This fixes that of neighbors configured via gRPC API. Test is also added. Signed-off-by: ISHIDA Wataru --- test/scenario_test/bgp_router_test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/scenario_test') diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py index baae3841..8292f6d0 100644 --- a/test/scenario_test/bgp_router_test.py +++ b/test/scenario_test/bgp_router_test.py @@ -18,6 +18,7 @@ from fabric.api import local from lib import base from lib.gobgp import * from lib.quagga import * +from lib.exabgp import * import sys import os import time @@ -336,6 +337,18 @@ class GoBGPTestBase(unittest.TestCase): self.assertTrue(len(paths) == 1) self.assertTrue(paths[0]['source-id'] == '192.168.0.2') + def test_19_check_grpc_add_neighbor(self): + g1 = self.gobgp + e1 = ExaBGPContainer(name='e1', asn=65000, router_id='192.168.0.7') + time.sleep(e1.run()) + e1.add_peer(g1) + n = e1.peers[g1]['local_addr'].split('/')[0] + g1.local('gobgp n add {0} as 65000'.format(n)) + g1.add_peer(e1, reload_config=False) + + g1.wait_for(expected_state=BGP_FSM_ESTABLISHED, peer=e1) + + if __name__ == '__main__': if os.geteuid() is not 0: -- cgit v1.2.3