A smoke test for WEAVE_NO_FASTDP

Partly for the side effect of restoring coverage of
router/ethernet_decoder.go
This commit is contained in:
David Wragg committed 2015-10-12 21:27:11 +01:00
1 parent b56ff7678c
commit 0093eb1220
1 file changed
+27
+27
View File
@@ -0,0 +1,27 @@
#! /bin/bash
. ./config.sh
C1=10.2.1.46
C2=10.2.1.47
start_suite "WEAVE_NO_FASTDP operation"
WEAVE_NO_FASTDP=1 weave_on $HOST1 launch
WEAVE_NO_FASTDP=1 weave_on $HOST2 launch $HOST1
start_container $HOST1 $C1/24 --name=c1
start_container $HOST2 $C2/24 --name=c2
# Without fastdp, ethwe should have an MTU of 65535
assert_raises "exec_on $HOST1 c1 sh -c 'ip link show ethwe | grep \ mtu\ 65535\ >/dev/null'"
# Pump some data over a TCP socket between the containers. This
# should cause PMTU discovery on the overlay network, and hence
# exercise the sleeve code to generate an ICMP frag-needed.
assert_raises "exec_on $HOST1 c1 sh -c 'nc -l -p 5555 >/tmp/foo'" &
sleep 5
assert_raises "exec_on $HOST2 c2 sh -c 'dd if=/dev/zero bs=10k count=1 | nc $C1 5555'"
assert_raises "exec_on $HOST1 c1 sh -c 'test \$(stat -c %s /tmp/foo) -eq 10240'"
end_suite