summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/docker_control.py
diff options
context:
space:
mode:
authorNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-01-29 16:25:50 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-29 17:24:57 +0900
commited699a962400b6c8703c2f435bd231eacc290222 (patch)
tree17f433c459559499266c2905171fa3b7415022fe /test/scenario_test/docker_control.py
parent0e4fe0c5f3bacac5f056f481bd143b202a3b71db (diff)
scenario_test: add new test case to malformed test
Diffstat (limited to 'test/scenario_test/docker_control.py')
-rw-r--r--test/scenario_test/docker_control.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/scenario_test/docker_control.py b/test/scenario_test/docker_control.py
index 056cdd01..baff3109 100644
--- a/test/scenario_test/docker_control.py
+++ b/test/scenario_test/docker_control.py
@@ -16,7 +16,6 @@
from fabric.api import local
import re
import os
-import sys
GOBGP_CONTAINER_NAME = "gobgp"
GOBGP_ADDRESS = "10.0.255.1/16"
@@ -75,7 +74,6 @@ def install_docker_and_tools():
local("docker pull osrg/gobgp", capture=True)
local("docker pull osrg/exabgp", capture=True)
local("mkdir /usr/local/gobgp", capture=True)
- # local("docker run --privileged=true -v /usr/local/gobgp:/mnt --name gobgp --rm osrg/gobgp go run /root/gobgp/tools/route-server/quagga-rsconfig.go -c /mnt", capture=True)
def docker_pkg_check():
@@ -83,7 +81,6 @@ def docker_pkg_check():
outbuf = local("dpkg -l | grep docker | awk '{print $2}'", capture=True)
dpkg_list = outbuf.split('\n')
for dpkg in dpkg_list:
- # print "lxc-docker in ",dpkg
if "lxc-docker" in dpkg:
docker_exists = True
return docker_exists
@@ -248,13 +245,12 @@ def bridge_unsetting_for_docker_connection():
def start_gobgp():
cmd = "docker exec gobgp " + STARTUP_FILE + " > /dev/null 2>&1 &"
- # cmd = "docker exec gobgp " + STARTUP_FILE
local(cmd, capture=True)
def start_exabgp(conf_file):
conf_path = EXABGP_CONFDIR + conf_file
- cmd = "docker exec exabgp /usr/local/exabgp/sbin/exabgp " + conf_path + " > /dev/null 2>&1 &"
+ cmd = "docker exec exabgp /root/exabgp/sbin/exabgp " + conf_path + " > /dev/null 2>&1 &"
local(cmd, capture=True)
@@ -341,6 +337,13 @@ def init_malformed_test_env_executor(conf_file, use_local):
gobgp_file = pwd + "/exabgp_test_conf/gobgpd.conf"
cmd = "cp " + gobgp_file + " " + CONFIG_DIRR
local(cmd, capture=True)
+ quagga_dir = CONFIG_DIRR + "q1"
+ cmd = "mkdir " + quagga_dir
+ local(cmd, capture=True)
+ 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)
docker_container_run_gobgp(BRIDGE_0)
docker_container_run_exabgp(BRIDGE_0)