diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-08-02 05:25:59 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-08-03 12:09:07 +0900 |
commit | 87bd4c1648e4aa6982add12d84ddf299aca1f4d7 (patch) | |
tree | 13396fe2e28d4eaf9c91b469e38be2ff224aa871 /test/scenario_test/bgp_router_test.py | |
parent | fc7bf0489913ef96fd7b31a00a98c92adb2bdfa4 (diff) |
test: deconfigure deleted peer for later tests
Depending on Docker version, Docker re-allocates deleted container's IP address
to new container.
If both deleted and new container run a BGP daemon and are peering to
other containers, other containers who think they are connecting to
deleted container's BGP daemon wrongly connect to new container's BGP
daemon (because IP address is same)
To avoid this issue, let's deconfigure deleted peer before going to next
test.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/bgp_router_test.py')
-rw-r--r-- | test/scenario_test/bgp_router_test.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py index 8292f6d0..a528c36d 100644 --- a/test/scenario_test/bgp_router_test.py +++ b/test/scenario_test/bgp_router_test.py @@ -145,9 +145,12 @@ class GoBGPTestBase(unittest.TestCase): self.test_04_check_quagga_global_rib() def test_07_stop_one_quagga(self): + g1 = self.gobgp q4 = self.quaggas['q4'] q4.stop() self.gobgp.wait_for(expected_state=BGP_FSM_ACTIVE, peer=q4) + + g1.del_peer(q4) del self.quaggas['q4'] # check gobgp properly send withdrawal message with q4's route @@ -285,6 +288,7 @@ class GoBGPTestBase(unittest.TestCase): self.assertTrue(med['metric'] == 2000) def test_17_check_shutdown(self): + g1 = self.gobgp q1 = self.quaggas['q1'] q2 = self.quaggas['q2'] q3 = self.quaggas['q3'] @@ -302,7 +306,6 @@ class GoBGPTestBase(unittest.TestCase): self.assertTrue(paths[0]['nexthop'] in n_addrs) q3.stop() - del self.quaggas['q3'] time.sleep(3) @@ -310,6 +313,9 @@ class GoBGPTestBase(unittest.TestCase): self.assertTrue(len(paths) == 1) self.assertTrue(paths[0]['nexthop'] in n_addrs) + g1.del_peer(q3) + del self.quaggas['q3'] + def test_18_check_withdrawal(self): g1 = self.gobgp q1 = self.quaggas['q1'] |