summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2018-05-15 08:57:44 +0900
committerIWASE Yusuke <iwase.yusuke0@gmail.com>2018-05-15 09:43:29 +0900
commit3fc524a5f5d810597757c63c51106819b520680f (patch)
treeb649242a6fb86ee5f17b97d036074cbc61d3a054 /test
parentefd215d814f0fc686c5d1ea7256bef77ce3ee194 (diff)
test/lib/gobgp: Rename graceful_restart() to stop_gobgp()
GoBGPContainer.graceful_restart() does not "restart" GoBGP daemon, but just stops (kills) GoBGP daemon. Then this patch renames graceful_restart() to stop_gobgp() to avoid confusion. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/lib/gobgp.py2
-rw-r--r--test/scenario_test/graceful_restart_test.py6
-rw-r--r--test/scenario_test/long_lived_graceful_restart_test.py4
-rw-r--r--test/scenario_test/vrf_neighbor_test2.py2
4 files changed, 7 insertions, 7 deletions
diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py
index 00efedf4..a4d697b1 100644
--- a/test/lib/gobgp.py
+++ b/test/lib/gobgp.py
@@ -113,7 +113,7 @@ class GoBGPContainer(BGPContainer):
local(cmd, capture=True)
self.local("{0}/start.sh".format(self.SHARED_VOLUME), detach=True)
- def graceful_restart(self):
+ def stop_gobgp(self):
self.local("pkill -INT gobgpd")
def _start_zebra(self):
diff --git a/test/scenario_test/graceful_restart_test.py b/test/scenario_test/graceful_restart_test.py
index b7462dbc..ac4130d2 100644
--- a/test/scenario_test/graceful_restart_test.py
+++ b/test/scenario_test/graceful_restart_test.py
@@ -69,7 +69,7 @@ class GoBGPTestBase(unittest.TestCase):
def test_02_graceful_restart(self):
g1 = self.bgpds['g1']
g2 = self.bgpds['g2']
- g1.graceful_restart()
+ g1.stop_gobgp()
g2.wait_for(expected_state=BGP_FSM_ACTIVE, peer=g1)
self.assertTrue(len(g2.get_global_rib('10.10.20.0/24')) == 1)
self.assertTrue(len(g2.get_global_rib('10.10.10.0/24')) == 1)
@@ -113,7 +113,7 @@ class GoBGPTestBase(unittest.TestCase):
g1 = self.bgpds['g1']
g2 = self.bgpds['g2']
g3 = self.bgpds['g3']
- g1.graceful_restart()
+ g1.stop_gobgp()
g2.wait_for(expected_state=BGP_FSM_ACTIVE, peer=g1)
self.assertTrue(len(g2.get_global_rib('10.10.20.0/24')) == 1)
self.assertTrue(len(g2.get_global_rib('10.10.30.0/24')) == 1)
@@ -153,7 +153,7 @@ class GoBGPTestBase(unittest.TestCase):
g2 = self.bgpds['g2']
g3 = self.bgpds['g3']
- g1.graceful_restart()
+ g1.stop_gobgp()
g2.wait_for(expected_state=BGP_FSM_ACTIVE, peer=g1)
g3.wait_for(expected_state=BGP_FSM_ACTIVE, peer=g1)
diff --git a/test/scenario_test/long_lived_graceful_restart_test.py b/test/scenario_test/long_lived_graceful_restart_test.py
index bba633ed..a9f6a0ee 100644
--- a/test/scenario_test/long_lived_graceful_restart_test.py
+++ b/test/scenario_test/long_lived_graceful_restart_test.py
@@ -88,7 +88,7 @@ class GoBGPTestBase(unittest.TestCase):
time.sleep(1)
- g2.graceful_restart()
+ g2.stop_gobgp()
g1.wait_for(expected_state=BGP_FSM_ACTIVE, peer=g2)
time.sleep(1)
@@ -140,7 +140,7 @@ class GoBGPTestBase(unittest.TestCase):
self.assertTrue(len(rib) == 1)
self.assertTrue(g2.asn in rib[0]['paths'][0]['aspath'])
- g2.graceful_restart()
+ g2.stop_gobgp()
g1.wait_for(expected_state=BGP_FSM_ACTIVE, peer=g2)
time.sleep(1)
diff --git a/test/scenario_test/vrf_neighbor_test2.py b/test/scenario_test/vrf_neighbor_test2.py
index 584fc8fa..6aa6a63e 100644
--- a/test/scenario_test/vrf_neighbor_test2.py
+++ b/test/scenario_test/vrf_neighbor_test2.py
@@ -125,7 +125,7 @@ class GoBGPTestBase(unittest.TestCase):
wait_for_completion(lambda: len(self.g5.get_global_rib()) == 1)
def test_06_graceful_restart(self):
- self.g1.graceful_restart()
+ self.g1.stop_gobgp()
self.g3.wait_for(expected_state=BGP_FSM_ACTIVE, peer=self.g1)
wait_for_completion(lambda: len(self.g3.get_global_rib(rf="vpnv4")) == 2)