summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/scenario_test/docker_control.py9
-rw-r--r--test/scenario_test/route_server_test.py24
2 files changed, 16 insertions, 17 deletions
diff --git a/test/scenario_test/docker_control.py b/test/scenario_test/docker_control.py
index e081df26..f1881b6b 100644
--- a/test/scenario_test/docker_control.py
+++ b/test/scenario_test/docker_control.py
@@ -14,6 +14,8 @@ BRIDGE_0 = "br0"
BRIDGE_1 = "br1"
BRIDGE_2 = "br2"
+sleep_time = 40
+
def test_user_check():
root = False
outbuf = local("echo $USER", capture=True)
@@ -160,17 +162,15 @@ def docker_container_append(quagga_num):
cmd = "docker exec gobgp /usr/bin/pkill gobgp -SIGHUP"
local(cmd, capture=True)
print "please wait"
- sleep_time = 15
time.sleep(sleep_time)
print "complete append docker container."
-def docker_container_depend(quagga_num):
+def docker_container_removed(quagga_num):
print "start remove docker container."
quagga = "q" + str(quagga_num)
docker_stop_quagga(quagga)
print "please wait"
- sleep_time = 15
time.sleep(sleep_time)
print "complete remove docker container."
@@ -222,7 +222,6 @@ def init_test_env_executor(quagga_num):
gobgp_start()
print "please wait"
- sleep_time = 15
time.sleep(sleep_time)
print "complete initialization of test environment."
@@ -233,4 +232,4 @@ def docker_related_install_executor():
print "you are not root"
print "please run the test after you login as root"
return
- docker_related_installation() \ No newline at end of file
+ docker_related_installation()
diff --git a/test/scenario_test/route_server_test.py b/test/scenario_test/route_server_test.py
index 9b9b1991..8915d8f8 100644
--- a/test/scenario_test/route_server_test.py
+++ b/test/scenario_test/route_server_test.py
@@ -214,25 +214,25 @@ class GoBGPTest(unittest.TestCase):
exist_n += 1
self.assertEqual(exist_n, 1)
- def test_07_active_when_depend_quagga(self):
- print "test_active_when_depend_quagga"
+ def test_07_active_when_quagga_removed(self):
+ print "test_active_when_removed_quagga"
# remove quagga container
- fab.docker_container_depend(self.deleting_quagga)
- depend_quagga_address = "10.0.0." + str(self.deleting_quagga)
+ fab.docker_container_removed(self.deleting_quagga)
+ removed_quagga_address = "10.0.0." + str(self.deleting_quagga)
- # get neighbor state and remote ip of depend quagga
- print "check of [" + depend_quagga_address + " ]"
- url = "http://" + self.gobgp_ip + ":" + self.gobgp_port + "/v1/bgp/neighbor/" + depend_quagga_address
+ # get neighbor state and remote ip of removed quagga
+ print "check of [" + removed_quagga_address + " ]"
+ url = "http://" + self.gobgp_ip + ":" + self.gobgp_port + "/v1/bgp/neighbor/" + removed_quagga_address
r = requests.get(url)
neighbor = json.loads(r.text)
state = neighbor['info']['bgp_state']
remote_ip = neighbor['conf']['remote_ip']
- self.assertEqual(depend_quagga_address, remote_ip)
+ self.assertEqual(removed_quagga_address, remote_ip)
self.assertEqual(state, "BGP_FSM_ACTIVE")
- def test_08_received_route_when_depend_quagga(self):
- print "test_received_route_when_depend_quagga"
+ def test_08_received_route_when_quagga_removed(self):
+ print "test_received_route_when_removed_quagga"
if self.check_load_config() is False:
return
@@ -269,8 +269,8 @@ class GoBGPTest(unittest.TestCase):
exist_n += 1
self.assertEqual(exist_n, 1)
- def test_09_advertising_route_when_depend_quagga(self):
- print "test_advertising_route_when_depend_quagga"
+ def test_09_advertising_route_when_quagga_removed(self):
+ print "test_advertising_route_when_removed_quagga"
if self.check_load_config() is False:
return