Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
A smoke test for WEAVE_NO_FASTDP
Browse files Browse the repository at this point in the history
Partly for the side effect of restoring coverage of
router/ethernet_decoder.go
  • Loading branch information
dpw committed Oct 12, 2015
1 parent b8187f4 commit d0f34c1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/190_no_fastdp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /bin/bash

. ./config.sh

C1=10.2.1.46
C2=10.2.1.47

start_suite "WEAVE_NO_FASTDP operation"

weave_on $HOST1 launch
weave_on $HOST2 launch

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 cause
# weave to generate an ICMP frag-needed
assert_raises "exec_on $HOST1 c1 sh -c 'nc -l -p 5555 >/tmp/foo &'"
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

0 comments on commit d0f34c1

Please sign in to comment.