summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/scenario_test/docker_control.py24
-rw-r--r--test/scenario_test/route_server_ipv4_v6_test.py4
-rw-r--r--test/scenario_test/route_server_malformed_test.py2
-rw-r--r--test/scenario_test/route_server_test.py14
4 files changed, 27 insertions, 17 deletions
diff --git a/test/scenario_test/docker_control.py b/test/scenario_test/docker_control.py
index 8c02d0f3..2d68748f 100644
--- a/test/scenario_test/docker_control.py
+++ b/test/scenario_test/docker_control.py
@@ -160,6 +160,9 @@ def docker_container_run_quagga(quagga_num, bridge):
local(cmd, capture=True)
quagga_address = BASE_NET[bridge["BRIDGE_NAME"]][IP_VERSION] + str(quagga_num) + BASE_MASK[IP_VERSION]
docker_container_set_ipaddress(bridge, quagga_name, quagga_address)
+ # restart quagga supervisord deamon in docker container for reset the retry of opensent message quagga sends
+ cmd = 'docker kill --signal="HUP" ' + quagga_name
+ local(cmd, capture=True)
def docker_container_run_gobgp(bridge):
@@ -350,9 +353,7 @@ def init_test_env_executor(quagga_num, use_local, go_path):
bridge_setting_for_docker_connection(BRIDGES)
make_config(quagga_num, go_path, BRIDGE_0)
- # run each docker container
- for num in range(1, quagga_num + 1):
- docker_container_run_quagga(num, BRIDGE_0)
+ # run gobgp docker container
docker_container_run_gobgp(BRIDGE_0)
# execute local gobgp program in the docker container if the input option is local
@@ -375,6 +376,10 @@ def init_test_env_executor(quagga_num, use_local, go_path):
change_owner_to_root(CONFIG_DIR)
start_gobgp()
+ # run quagga docker container
+ for num in range(1, quagga_num + 1):
+ docker_container_run_quagga(num, BRIDGE_0)
+
print "complete initialization of test environment."
@@ -391,9 +396,7 @@ def init_ipv6_test_env_executor(quagga_num, use_local, go_path):
bridge_setting_for_docker_connection([BRIDGE_0])
make_config(quagga_num, go_path, BRIDGE_0)
- # run each docker container
- for num in range(1, quagga_num + 1):
- docker_container_run_quagga(num, BRIDGE_0)
+ # run gobgp docker container
docker_container_run_gobgp(BRIDGE_0)
# execute local gobgp program in the docker container if the input option is local
@@ -416,6 +419,10 @@ def init_ipv6_test_env_executor(quagga_num, use_local, go_path):
change_owner_to_root(CONFIG_DIR)
start_gobgp()
+ # run quagga docker container
+ for num in range(1, quagga_num + 1):
+ docker_container_run_quagga(num, BRIDGE_0)
+
print "complete initialization of test environment."
@@ -440,8 +447,9 @@ def init_malformed_test_env_executor(conf_file, use_local):
quagga_file = pwd + "/exabgp_test_conf/quagga.conf"
cmd = "cp " + quagga_file + " " + quagga_dir + "/bgpd.conf"
local(cmd, capture=True)
- docker_container_run_quagga(1, BRIDGE_0)
+ # run gobgp docker container
docker_container_run_gobgp(BRIDGE_0)
+ # run exabgp docker container
docker_container_run_exabgp(BRIDGE_0)
# execute local gobgp program in the docker container if the input option is local
@@ -463,6 +471,8 @@ def init_malformed_test_env_executor(conf_file, use_local):
change_owner_to_root(CONFIG_DIR)
start_gobgp()
+ # run quagga docker container
+ docker_container_run_quagga(1, BRIDGE_0)
start_exabgp(conf_file)
diff --git a/test/scenario_test/route_server_ipv4_v6_test.py b/test/scenario_test/route_server_ipv4_v6_test.py
index b5dc2c8c..286bb915 100644
--- a/test/scenario_test/route_server_ipv4_v6_test.py
+++ b/test/scenario_test/route_server_ipv4_v6_test.py
@@ -57,10 +57,10 @@ class GoBGPIPv6Test(unittest.TestCase):
use_local = parser_option.use_local
go_path = parser_option.go_path
fab.init_ipv6_test_env_executor(self.quagga_num, use_local, go_path)
+ print "please wait " + str(self.sleep_time) + " second"
time.sleep(self.sleep_time)
- print "please wait"
fab.docker_container_ipv6_quagga_append_executor([3, 4], go_path)
- print "please wait"
+ print "please wait " + str(self.sleep_time) + " second"
time.sleep(self.sleep_time)
if self.check_load_config() is False:
return
diff --git a/test/scenario_test/route_server_malformed_test.py b/test/scenario_test/route_server_malformed_test.py
index 6788def2..077ad847 100644
--- a/test/scenario_test/route_server_malformed_test.py
+++ b/test/scenario_test/route_server_malformed_test.py
@@ -73,7 +73,7 @@ def test_malformed_packet():
conf_file = pwd + "/exabgp_test_conf/" + pkey
if os.path.isfile(conf_file) is True:
fab.init_malformed_test_env_executor(pkey, use_local)
- print "please wait"
+ print "please wait " + str(sleep_time) + " second"
time.sleep(sleep_time)
yield check_func, pkey, pattern[pkey]
diff --git a/test/scenario_test/route_server_test.py b/test/scenario_test/route_server_test.py
index 94db095a..de4b60fc 100644
--- a/test/scenario_test/route_server_test.py
+++ b/test/scenario_test/route_server_test.py
@@ -58,7 +58,7 @@ class GoBGPTest(unittest.TestCase):
go_path = parser_option.go_path
fab.init_test_env_executor(self.quagga_num, use_local, go_path)
- print "please wait"
+ print "please wait " + str(self.sleep_time) + " second"
time.sleep(self.sleep_time)
if self.check_load_config() is False:
return
@@ -152,7 +152,7 @@ class GoBGPTest(unittest.TestCase):
go_path = parser_option.go_path
# append new quagga container
fab.docker_container_quagga_append_executor(self.append_quagga, go_path)
- print "please wait"
+ print "please wait " + str(self.sleep_time) + " second"
time.sleep(self.sleep_time)
append_quagga_address = "10.0.0." + str(self.append_quagga)
@@ -240,7 +240,7 @@ class GoBGPTest(unittest.TestCase):
# remove quagga container
fab.docker_container_quagga_removed_executor(self.remove_quagga)
- print "please wait"
+ print "please wait " + str(self.sleep_time) + " second"
time.sleep(self.sleep_time)
removed_quagga_address = "10.0.0." + str(self.remove_quagga)
@@ -334,7 +334,7 @@ class GoBGPTest(unittest.TestCase):
go_path = parser_option.go_path
fab.docker_container_make_bestpath_env_executor(self.append_quagga_best, go_path)
- print "please wait"
+ print "please wait " + str(self.sleep_time) + " second"
time.sleep(self.sleep_time)
print "add neighbor setting"
@@ -352,7 +352,7 @@ class GoBGPTest(unittest.TestCase):
qaccess.add_neighbor(tn, "65003", "12.0.0.20", "65020")
qaccess.add_neighbor_metric(tn, "65003", "10.0.255.1", "100")
- print "please wait"
+ print "please wait " + str(self.sleep_time) + " second"
time.sleep(self.sleep_time)
check_address = "10.0.0.1"
@@ -380,7 +380,7 @@ class GoBGPTest(unittest.TestCase):
idx = 0
if len(g_paths) < 2:
print "target path has not been bestpath selected yet."
- print "please wait more."
+ print "please wait " + str(self.sleep_time/2) + " second more."
time.sleep(self.sleep_time/2)
self.check_bestpath(check_address, target_network, ans_nexthop)
return
@@ -392,7 +392,7 @@ class GoBGPTest(unittest.TestCase):
idx += 1
if target_exist is False:
print "target path has not been receive yet."
- print "please wait more."
+ print "please wait " + str(self.sleep_time/2) + " second more."
time.sleep(self.sleep_time/2)
self.check_bestpath(check_address, target_network, ans_nexthop)
return