diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-06-02 15:48:31 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-06-02 15:48:31 +0000 |
commit | 3c377d437d9380111fb61bd0dc441eaf4e2c5209 (patch) | |
tree | 0d2db8803c8c5e6722671a0b487fad73c9af0df9 /test/scenario_test | |
parent | 81bc3851b2c1f112f157b98a3cf60757a199a31a (diff) |
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 <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test')
-rw-r--r-- | test/scenario_test/bgp_router_test.py | 13 |
1 files changed, 13 insertions, 0 deletions
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: |