Commit Graph

45 Commits

Author SHA1 Message Date
Andrea Luzzardi 7394be0704 Replace --addr with --advertise
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-26 17:43:14 -07:00
Andrea Luzzardi b4efc08dfc api: Integrate leader election.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-22 21:23:34 -07:00
Alexandre Beslic ec478d8ed5 Add integration tests for engines departure with node removal and ephemeral behavior
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 12:08:56 -07:00
Andrea Luzzardi ac18ef381d integration: cover more grounds in discovery testing.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi 7430fe5141 fix hb/timeout being time.Duration in a few places
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi 2a27adaea1 discovery integration: No need to wait anymore
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Victor Vieux 59cd11b946 change swarm.heartbeat to swarm.discovery.heartbeat
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 15:48:07 -07:00
Victor Vieux 5db3a9cd0e remove options struct, yay!
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-13 15:36:30 -07:00
Andrea Luzzardi 95511f1074 integration: force start_docker_with_busybox to only take the latest tag
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-06 15:47:53 -07:00
Andrea Luzzardi 0bf6cf6dc9 integration helpers: add start_with_busybox
starts an engine with a preloaded busybox without pulling (much faster).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-06 10:51:07 -07:00
Andrea Luzzardi 7865004ec9 Merge pull request #725 from aluzzardi/discovery-integration-cleanup
Discovery integration cleanup
2015-05-06 10:50:11 -07:00
Andrea Luzzardi 75c54c22a1 integration helpers: allow tests to be located in subdirectories.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-06 00:35:02 -07:00
Andrea Luzzardi a2703e0562 integration: helpers cleanup.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-05 19:19:10 -07:00
Andrea Luzzardi 4ac91fd7cd integration helpers: Revamped swarm join/manage.
- swarm_join can be called multiple times. Only new nodes will join the
  discovery.
- swarm_join won't return until the nodes are visible in discovery
  (swarm list).
- swarm_manage won't return until the nodes are visible in the manager.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-05 18:35:16 -07:00
Andrea Luzzardi bd3c5c3636 Revert "use retry to wait for swarm join"
This reverts commit 89fe217e12.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>

Conflicts:
	test/integration/helpers.bash
2015-05-05 18:35:09 -07:00
Andrea Luzzardi bca0e2e8c2 integration: cleanup discovery tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-05 16:06:41 -07:00
Andrea Luzzardi 1187069407 integration: fix nodes patterns in docker_swarm info
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-05 00:20:22 -07:00
Andrea Luzzardi b7413d3138 integration helpers: fix the wait for docker join
It used to output `[: -eq: unary operator expected` since the grep
command didn't give any output, therefore generating a syntax error.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-04 23:52:34 -07:00
Andrea Luzzardi 5d10f47b32 integration helpers: move the docker_ functions together
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-04 23:17:29 -07:00
Andrea Luzzardi b4af7acd83 integration: Run tests using docker master.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-04 23:17:29 -07:00
Andrea Luzzardi 86bf53a504 integration: Support using a different CLI.
- `docker` will now use the CLI defined in $DOCKER_BINARY
- In order to communicate with the host docker, one must use
  `docker_host`

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-04 23:17:29 -07:00
Andrea Luzzardi fdf74cef2a Merge pull request #465 from chanwit/test-create-cluster-on-hub
integration: add a test to verify creating cluster on hub
2015-05-04 22:00:37 -07:00
Chanwit Kaewkasi 89fe217e12 use retry to wait for swarm join
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-05-05 11:44:47 +07:00
Andrea Luzzardi 6df673372f integration: Use aufs by default.
The problem has been fixed in the dind images.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-04 17:29:00 -07:00
Andrea Luzzardi f50af455fa integration tests: Don't build binaries anymore, it's too slow.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-04 14:20:28 -07:00
Andrea Luzzardi ad98b865b7 integration: Run engines with --net=host.
Since we were mapping the port back to the host anyway, this doesn't
change anything.

However, it does fix `docker exec`.

Fixes #658

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-04 13:36:36 -07:00
Andrea Luzzardi 3cc8a2b5fd Merge pull request #703 from aluzzardi/integration-image
integration: Use the brand new dind image.
2015-05-04 13:43:38 -07:00
Andrea Luzzardi 24aaaa029e integration: Use the brand new dind image.
We now have dockerswarm/dind:
- Much more lightweight.
- Exists in every version since Docker 1.0.0.

Depends on #700 as it cannot run on aufs.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-03 19:20:47 -07:00
Andrea Luzzardi 671ddc8feb integration tests: run with native/vfs by default.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-03 19:08:02 -07:00
Andrea Luzzardi f9a03c62f1 integration: Add the re-usable "retry" helper.
Retry was kind of extracted from wait_until_reachable. The goal is to be
able to wait for a command to succeed, or fail if it doesn't succeed
after a defined number of attempts.

Indirectly improve the error logging: the output of the retry command
won't show up unless it constantly failed.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-30 20:09:54 -07:00
Andrea Luzzardi 29deacba2f fix integration test build of swarm
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-30 13:28:13 -07:00
Andrea Luzzardi b71d5fa19c Fix integration test cleanup.
- Do not run swarm using a function since it forks a subshell and we end
  up killing it instead of the binary.
- Build a binary at each run instead of using go run. This is faster and
  fixes the cleanup for the same reason as the subshell.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-28 15:47:25 -07:00
Victor Vieux 0924df6250 fix error message in tets
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-27 13:47:53 -07:00
Andrea Luzzardi 30790fb1e3 Merge pull request #667 from vieux/affinity_labels
Affinity labels like  `-e affinity:com.example.type==test`
2015-04-27 12:36:07 -07:00
Victor Vieux c7746f9463 use godep go run everywhere in tests
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-27 10:45:45 -07:00
Victor Vieux 28a358d9b2 use docker 1.6, add affinity tests and add doc
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-23 16:10:34 -07:00
Andrea Luzzardi 86ed98baa2 integration: Run swarm using go run.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-18 20:26:55 -07:00
Andrea Luzzardi 62afd8133a integration: Fix swarm_manage helper with custom discovery.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-15 19:39:12 -07:00
Chanwit Kaewkasi e9cd9ba234 add integration test for zookeeper discovery
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-04-10 00:05:08 +07:00
Chanwit Kaewkasi 458d83802f make SWARM_ROOT configurable
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
2015-03-26 22:51:09 +07:00
Victor Vieux 328b9ae13b add support for docker ps -l / -n
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-10 01:04:27 +00:00
Andrea Luzzardi f9a6c1bd89 integration: stop_docker: delete volumes as well.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-03-06 17:20:26 -08:00
Andrea Luzzardi 9567185038 integration helpers: Fix concurrent calls to start_docker().
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-03-06 16:09:06 -08:00
Andrea Luzzardi ac7fdeab6b integration: Minor bash improvements in the helpers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-03-06 16:09:06 -08:00
Andrea Luzzardi 108f4ebe06 integration: Rename vars to helpers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-03-06 11:42:43 -08:00