168168 -v $( pwd) /${TMPC_ROOT} :/scratch \
169169 -v /usr/local/bin/runc:/usr/local/bin/runc \
170170 -w /go/src/github.com/docker/libnetwork \
171- golang:1.4 ./cmd/dnet/dnet -d -D ${hopt} -c ${tomlfile}
171+ mrjana/golang ./cmd/dnet/dnet -d -D ${hopt} -c ${tomlfile}
172+
172173 wait_for_dnet $( inst_id2port ${inst} ) ${name}
173174}
174175
@@ -256,14 +257,16 @@ function stop_zookeeper() {
256257
257258function test_overlay() {
258259 dnet_suffix=$1
259- shift
260260
261261 echo $( docker ps)
262262
263263 start=1
264264 end=3
265265 # Setup overlay network and connect containers ot it
266- dnet_cmd $( inst_id2port 1) network create -d overlay multihost
266+ if [ -z " ${2} " -o " ${2} " != " skip_add" ]; then
267+ dnet_cmd $( inst_id2port 1) network create -d overlay multihost
268+ fi
269+
267270 for i in ` seq ${start} ${end} ` ;
268271 do
269272 dnet_cmd $( inst_id2port $i ) container create container_${i}
@@ -273,6 +276,8 @@ function test_overlay() {
273276 # Now test connectivity between all the containers using service names
274277 for i in ` seq ${start} ${end} ` ;
275278 do
279+ runc $( dnet_container_name $i $dnet_suffix ) $( get_sbox_id ${i} container_${i} ) \
280+ " ping -c 1 www.google.com"
276281 for j in ` seq ${start} ${end} ` ;
277282 do
278283 if [ " $i " -eq " $j " ]; then
@@ -290,7 +295,9 @@ function test_overlay() {
290295 dnet_cmd $( inst_id2port $i ) container rm container_${i}
291296 done
292297
293- dnet_cmd $( inst_id2port 2) network rm multihost
298+ if [ -z " ${2} " -o " ${2} " != " skip_rm" ]; then
299+ dnet_cmd $( inst_id2port 2) network rm multihost
300+ fi
294301}
295302
296303function check_etchosts() {
0 commit comments