Files
weave/test
Adam Harrison de17a44f35 Fix fragmentation test
The assumptions on which this test was based were violated by the
introduction of fast datapath. A new rule is required to block fast
datapath traffic, to ensure that sleeve is selected for forwarding; the
rules must also be moved from the FORWARD chain to INPUT as the router
now runs in the host netns (NB we use INPUT instead of OUTPUT as the
latter results in sleeve receiving an 'operation not permitted' udpv4
write error when it tries to send a packet that is too big, rather than
the packet just being silently dropped as required)
2016-01-25 10:58:31 +00:00
..
2015-09-29 07:46:00 +00:00
2015-09-24 03:25:30 +00:00
2016-01-25 10:58:31 +00:00
2015-11-03 12:03:00 +00:00
2015-09-30 22:57:10 +01:00
2015-08-25 16:53:21 +00:00
2015-08-07 14:40:34 +01:00
2015-07-30 11:07:17 +00:00
2015-07-30 11:07:17 +00:00
2015-07-30 11:07:17 +00:00
2015-07-30 11:07:17 +00:00
2015-06-26 11:10:08 +01:00
2015-08-12 07:40:20 +01:00

This directory contains integration tests for weave.

Requirements

You need two VMs with docker >=1.6.0 installed and listening on TCP port 2375 (see below). You also need to be able to ssh to these VMs, preferably without having to input anything.

The Vagrantfile in this directory constructs two such VMs.

To create the VMs, open a shell and in this directory and type

vagrant up

To meet the aforementioned ssh requirement you may want to

cp ~/.vagrant.d/insecure_private_key .

Running tests

If you are building weave using Vagrant, it is recommended to run the tests from the build VM and not the host.

./setup.sh

uploads the weave images from where the Makefile puts them (/var/tmp) to the two docker hosts, and copies the weave script over.

Then you can use, e.g.,

./200_dns_test.sh

to run an individual test, or

./run_all.sh

to run everything named *_test.sh.

Using other VMs

By default the tests assume the Vagrant VMs are used.

To use other VMs, set the environment variable HOSTS to the space-separated list of IP addresses of the docker hosts, and set the environment variable SSH to a command that will log into either (which may just be ssh).

Making docker available over TCP

To make docker listen to a TCP socket, you will usually need to either run it manually with an option like -H tcp://0.0.0.0:2375; or, for apt-get installed docker (Ubuntu and Debian), add the line

DOCKER_OPTS="--host unix:///var/run/docker.sock --host tcp://0.0.0.0:2375"

to the file /etc/default/docker, then restart docker.

Updating the GCE test image

When a new version of Docker is released, you'll need to update the GCE test image.

To do this, pick a fresh TEMPLATE_NAME and update any commands in function make_template in gce.sh, then run:

./gce.sh make_template

For this you'll need the GCE credentials, which can be found in bin/setup-circleci-secrets, which you'll need to decrypt and run (its echos the secrets into know locations):

./bin/setup-circleci-secrets "$SECRET_PASSWORD"

If you don't know the password, ask tom@weave.works.