summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-06-10 16:55:52 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-06-10 18:17:32 +0900
commit00c5499ef19c40f6aa5f217d3cd6a73db3b6acb5 (patch)
tree40da14938dd27a24d89944ce07a20f4962f49ef5 /test/scenario_test
parentf60ec00e0b3cc5dcfcf78e1a3dfd1b85be31e678 (diff)
scenario_test: use docker stop
Diffstat (limited to 'test/scenario_test')
-rw-r--r--test/scenario_test/docker_control.py16
-rw-r--r--test/scenario_test/route_server_malformed_test.py1
2 files changed, 5 insertions, 12 deletions
diff --git a/test/scenario_test/docker_control.py b/test/scenario_test/docker_control.py
index 83918d41..c55826ef 100644
--- a/test/scenario_test/docker_control.py
+++ b/test/scenario_test/docker_control.py
@@ -300,6 +300,9 @@ def start_gobgp(build=True):
def start_exabgp(conf_file):
+ # run exabgp docker container
+ docker_container_run_exabgp(BRIDGE_0)
+
cmd = "docker exec exabgp cp -f " + SHARE_VOLUME + "/exabgp_test_conf/exabgp.env /root/exabgp/etc/exabgp/exabgp.env"
local(cmd, capture=True)
conf_path = EXABGP_CONFDIR + "/" + conf_file
@@ -308,8 +311,7 @@ def start_exabgp(conf_file):
def stop_exabgp():
- cmd = "docker exec exabgp pkill -9 python"
- local(cmd, capture=True)
+ docker_container_stop_exabgp()
log_path = CONFIG_DIRR + EXABGP_LOG_FILE
clean_log(log_path)
@@ -512,9 +514,7 @@ def init_policy_test_env_executor(quagga_num, use_local, go_path, log_debug=Fals
if use_exabgp:
# run exabgp
make_config_append(100, go_path, BRIDGE_0, peer_opts="--none-peer", policy_pattern=policy)
- docker_container_run_exabgp(BRIDGE_0)
- cmd = "docker exec exabgp cp -rf " + SHARE_VOLUME + "/exabgp /root/"
- local(cmd, capture=True)
+ start_exabgp(EXABGP_COMMON_CONF)
start_gobgp(build=False)
@@ -522,10 +522,6 @@ def init_policy_test_env_executor(quagga_num, use_local, go_path, log_debug=Fals
for num in range(1, quagga_num + 1):
docker_container_run_quagga(num, BRIDGE_0)
- # start exabgp
- if use_exabgp:
- start_exabgp(EXABGP_COMMON_CONF)
-
print "complete initialization of test environment."
@@ -593,8 +589,6 @@ def init_malformed_test_env_executor(use_local, go_path, exabgp_path, log_debug
# run gobgp docker container
docker_container_run_gobgp(BRIDGE_0)
- # run exabgp docker container
- docker_container_run_exabgp(BRIDGE_0)
# set log option
opt = "-l debug" if log_debug else ""
diff --git a/test/scenario_test/route_server_malformed_test.py b/test/scenario_test/route_server_malformed_test.py
index 1a76f6aa..f695b562 100644
--- a/test/scenario_test/route_server_malformed_test.py
+++ b/test/scenario_test/route_server_malformed_test.py
@@ -21,7 +21,6 @@ import nose
import collections
import docker_control as fab
from fabric.api import local
-import requests
import json
import toml
from noseplugin import OptionParser