Skip to content

Commit

Permalink
Fix IT test breakages
Browse files Browse the repository at this point in the history
With DNS resolution happening within the container namespace
test should not try to ping a DNS name and expect a packet
loss message. It will only show up as a DNS name resolution
failure. Changed the bridge internal test to test for a
well known IP address.

Also rearranged the overlay internal tests so that it gets
to run before the dnet container is removed which was
happening in previous tests.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
  • Loading branch information
mrjana committed Apr 10, 2016
1 parent 5ca79d6 commit 389d498
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/integration/dnet/bridge.bats
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ function test_single_network_connectivity() {
dnet_cmd $(inst_id2port 1) container create container_1
# connects to internal network, confirm it can't conmunicate with outside world
net_connect 1 container_1 internal
run runc $(dnet_container_name 1 bridge) $(get_sbox_id 1 container_1) "ping -c 1 www.google.com"
run runc $(dnet_container_name 1 bridge) $(get_sbox_id 1 container_1) "ping -c 1 8.8.8.8"
[[ "$output" == *"1 packets transmitted, 0 packets received, 100% packet loss"* ]]
net_disconnect 1 container_1 internal
# connects to bridge network, confirm it can conmunicate with outside world
net_connect 1 container_1 bridge
runc $(dnet_container_name 1 bridge) $(get_sbox_id 1 container_1) "ping -c 1 www.google.com"
runc $(dnet_container_name 1 bridge) $(get_sbox_id 1 container_1) "ping -c 1 8.8.8.8"
net_disconnect 1 container_1 bridge
dnet_cmd $(inst_id2port 1) container rm container_1
# test conmunications within internal network
Expand Down
16 changes: 8 additions & 8 deletions test/integration/dnet/overlay-consul.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@ load helpers
test_overlay consul skip_add
}

@test "Test overlay network internal network with consul" {
skip_for_circleci
test_overlay consul internal
}

@test "Test overlay network with dnet ungraceful shutdown" {
skip_for_circleci
dnet_cmd $(inst_id2port 1) network create -d overlay multihost
start=1
end=3
for i in `seq ${start} ${end}`;
do
dnet_cmd $(inst_id2port $i) container create container_${i}
net_connect ${i} container_${i} multihost
dnet_cmd $(inst_id2port $i) container create container_${i}
net_connect ${i} container_${i} multihost
done

hrun runc $(dnet_container_name 1 consul) $(get_sbox_id 1 container_1) "ifconfig eth0"
Expand All @@ -51,11 +56,6 @@ load helpers
container_1_new_ip=$(echo ${output} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')

if [ "$container_1_ip" != "$container_1_new_ip" ]; then
exit 1
exit 1
fi
}

@test "Test overlay network internal network with consul" {
skip_for_circleci
test_overlay consul internal
}

0 comments on commit 389d498

Please sign in to comment.