moby/libnetwork/test/integration
Madhu Venugopal 1aa88fa870 Allow endpoint delete if sandbox identifier is stale
There are cases as seen in https://github.com/docker/docker/issues/17984
the sandbox could be stale in endpoint structure, when the actual
sandbox is removed during the cleanup phase. Hence instead of just
validating for sandboxID, make sure if it is actually present in the
sandboxes DB managed by the controller.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-11-17 21:00:46 -08:00
..
dnet Allow endpoint delete if sandbox identifier is stale 2015-11-17 21:00:46 -08:00
daemon-configs.bats Initial bats based integration tests for testing daemon network configs 2015-04-25 07:33:48 -07:00
daemon.cfg Initial bats based integration tests for testing daemon network configs 2015-04-25 07:33:48 -07:00
helpers.bash Initial bats based integration tests for testing daemon network configs 2015-04-25 07:33:48 -07:00
README.md Initial bats based integration tests for testing daemon network configs 2015-04-25 07:33:48 -07:00

LibNetwork Integration Tests

Integration tests provide end-to-end testing of LibNetwork and Drivers.

While unit tests verify the code is working as expected by relying on mocks and artificially created fixtures, integration tests actually use real docker engines and communicate to it through the CLI.

Note that integration tests do not replace unit tests and Docker is used as a good use-case.

As a rule of thumb, code should be tested thoroughly with unit tests. Integration tests on the other hand are meant to test a specific feature end to end.

Integration tests are written in bash using the bats framework.

Pre-Requisites

  1. Bats (https://github.com/sstephenson/bats#installing-bats-from-source)
  2. Docker Machine (https://github.com/docker/machine)
  3. Virtualbox (as a Docker machine driver)

Running integration tests

In order to run all integration tests, pass bats the test path:

$ bats test/integration/daemon-configs.bats