Commit Graph

4345 Commits

Author SHA1 Message Date
5ce3711251 Merge pull request #30010 from thaJeztah/master-revert-27146
Revert "Require continuation char to be last char in a line"
Upstream-commit: bf71db7a12c6855720182d02af1a58c0b343468d
Component: engine
2017-01-12 09:17:08 -05:00
b003f7cdb4 Merge pull request #30077 from tonistiigi/fix-test-leaks
Fix leaked connections in integration tests
Upstream-commit: af5323f9583dbce0f6d8a43a2e442400b9e9b981
Component: engine
2017-01-12 11:35:02 +01:00
4481a136ca Merge pull request #30079 from tonistiigi/debug-trusttest
Print daemon stacktrace when trust test times out
Upstream-commit: 640a5c1a38b3d6128be27f15e823e7cb2ce7e323
Component: engine
2017-01-11 17:06:33 -08:00
8618f63e83 Print daemon stacktrace when trust test times out
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e533685d13251e5c7127f2d92636c7fa6393c06e
Component: engine
2017-01-11 15:14:36 -08:00
24c4a881f8 Fix leaked connections in integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 1e98fb5ad91b956005059ae2148b1dda6fdf372c
Component: engine
2017-01-11 14:48:48 -08:00
b8f872e90b Merge pull request #29891 from sanimej/libnvendor
vendorin libnetwork @f9fa6e0
Upstream-commit: de54284bd7cf4e1c8c255c61d0cf05533f3c2ba4
Component: engine
2017-01-11 19:55:00 +01:00
2b1a88aa3b Handle IPv6 enabling correctly in the tests
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: d5e8d8e1cfb65cab9a2a651fd30c50a06afb4e00
Component: engine
2017-01-10 16:34:23 -08:00
acaf4ba63f Allow swarm init with --availability=drain
This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0f30c644441b3b4150252af1b41db99d4b6e697a
Component: engine
2017-01-10 16:31:51 -08:00
9a5d4b9c8d Allow swarm join with --availability=drain
This fix tries to address the issue raised in 24596 where it was not
possible to join as manager only (`--availability=drain`).

This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

NOTE: Additional pull request for swarmkit and engine-api will
be created separately.

This fix fixes 24596.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a8e7e37aa82d1adac67b05836ea97a06fbdfdbf0
Component: engine
2017-01-10 16:31:51 -08:00
59c79fe38f Merge pull request #29787 from yongtang/29730-multiple-published-port
Fix issues of multiple published ports mapping to the same target port
Upstream-commit: 82dfa6563fe78d41eb2f720e1f041f52e02b2a7a
Component: engine
2017-01-10 18:49:16 +01:00
6a39de5e4f Merge pull request #29947 from vdemeester/integration-some-runCommandWithOutput-clean
[test-integration] clean some runCommandWithOutput
Upstream-commit: e5058ff15cac51836f426175df8a7840a670f046
Component: engine
2017-01-10 15:56:42 +01:00
3229d5a2cb Fix issues of multiple published ports mapping to the same target port
This fix tries to address the issue raised in docker/docker-29730
where a service with multiple published ports mapping to the same target
port (e.g., `--publish 5000:80 --publish 5001:80`) can't be allocated.

The reason for the issue is that, `getPortConfigKey` is used for both
allocated ports and configured (may or may not be allocated) ports.
However, `getPortConfigKey` will not take into consideration the
`PublishedPort` field, which actually could be different for different
allocated ports.

This fix saves a map of `portKey:portNum:portState`,  instead of currently
used `portKey:portState` so that multiple published ports could be processed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cb59bd0c5194f3f74cd405a87b562465219cad8a
Component: engine
2017-01-10 00:46:18 -08:00
cc35939485 Revert "Require continuation char to be last char in a line"
This reverts commit 105bc63295a7126798d3722a0e205c5ead4e2b1c,
which (although correct), resulted in a backward incompatible
change.

We can re-implement this in future, after this changes goes
through a deprecation cycle

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c67550414b762ab32ea3e9645ebcafb79cb9059d
Component: engine
2017-01-10 00:41:03 +01:00
ddcbfb5519 Merge pull request #29143 from vdemeester/node-cli-unit-tests
Add some unit tests to the node and swarm cli code
Upstream-commit: 38f766ae0e4b80d452a3825c42a7ac9fee965790
Component: engine
2017-01-09 20:52:23 +01:00
f34f548a3b Merge pull request #29955 from vieux/improve_secret_Create
remove -f on secret create and unify usage with other commands
Upstream-commit: 3e298f46a2318c792dc476a178c3df34d1247fa4
Component: engine
2017-01-09 10:22:39 -08:00
f6ad06ceb6 Add some unit tests to the node and swarm cli code
Start work on adding unit tests to our cli code in order to have to
write less costly integration test.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f151c297eb268e22dc1eb36ded0e356885f40739
Component: engine
2017-01-09 18:30:15 +01:00
701de0a381 Merge pull request #29226 from yongtang/28535-prune-until-follow-up
Add `--filter until=<timestamp>` for `docker container/image prune`
Upstream-commit: f1fdbeca2a39c7189b1ca8db4e4543fe77ff1150
Component: engine
2017-01-09 17:58:01 +01:00
3bc19fbcc4 Merge pull request #29795 from vdemeester/integration-request-package
[test-integration] Add a new request package in integration-cli
Upstream-commit: d4791c7b64b6095917e0a0ac9b376045ef3d353f
Component: engine
2017-01-09 14:51:40 +01:00
a4186cae43 Merge pull request #29874 from allencloud/fix-29872-volume-ls-filter
fix volume ls filter driver
Upstream-commit: e8e4546bc34ae3b84a9cbdd089f972f56695ece5
Component: engine
2017-01-09 13:06:17 +01:00
a1623b99ae Merge pull request #29931 from tonistiigi/test-swarm-errors
Add test for swarm error handling
Upstream-commit: f96180a0a88c541b1a413a9371cb5695c70b7323
Component: engine
2017-01-09 11:26:09 +01:00
78d1ff88be Update trustedCmd to be compatible with testutil/cmd
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 303b1d200af65ebb165602d0137f8b24b7c54d66
Component: engine
2017-01-09 11:07:05 +01:00
775c5633ef *: use opencontainers/go-digest package
The `digest` data type, used throughout docker for image verification
and identity, has been broken out into `opencontainers/go-digest`. This
PR updates the dependencies and moves uses over to the new type.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 7a855799175b6b984886ef1cfa337d6df1d4c668
Component: engine
2017-01-06 18:48:41 -08:00
589e081a09 remove -f on secret create and unify usage with other commands
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: db6652ca71c60c1ff3ac274968876c88eb7146ad
Component: engine
2017-01-06 14:07:48 -08:00
236f68013a Fix workdir cache invalidation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e16086005425b626bccc0fedcf5ae195f913c636
Component: engine
2017-01-06 12:10:59 -08:00
1725c8a9d3 Merge pull request #29899 from Microsoft/jjh/testbuildworkdirimagecmd
Windows: Enable TestBuildWorkdirImageCmd
Upstream-commit: b7c25317799e5fa380d3167823f09263f4397114
Component: engine
2017-01-06 17:15:22 +01:00
72dca92b14 Merge pull request #29929 from aaronlehmann/secret-test-fix
Fix TestSecretCreateWithLabels nondeterminism
Upstream-commit: bf8cdb9172c3516eecb80974971b0b2da00afc11
Component: engine
2017-01-06 13:47:08 +09:00
2eb5499d33 Add test for swarm error handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d377b074fdcbf735d9fbafdb9bcab6878e5c0ae9
Component: engine
2017-01-05 15:46:07 -08:00
0317f61145 Fix TestSecretCreateWithLabels nondeterminism
This test checks for the substring "foo" in the "secret ls" output. This
is a valid base36 substring and can sometimes show up by chance:

    docker_cli_secret_create_test.go:86:
        c.Assert(out, checker.Not(checker.Contains), name)
    ... obtained string = "" +
    ...     "ID                          NAME                        CREATED UPDATED\n" +
    ...     "ob8y4t4feuz8pn5h6vla9oxoz   stefoo7e268ozqfupi9s4se9q   Less than a second ago   Less than a second ago\n"
    ... substring string = "foo"

Change the secret name to test_secret, matching other tests. Underscores
can't appear in base36 so this name is safe to grep for.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 45833ce54d741b2378819e3ba5859533c317ae01
Component: engine
2017-01-05 15:22:51 -08:00
beeae010cf Set plugins used in tests back to original names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f4798b98fc2c8d3d7688fdd7c1a055f452c29770
Component: engine
2017-01-05 13:55:43 -08:00
dc5e201344 Merge pull request #29845 from vdemeester/fix-the-fix-facepalming-myself
[test-integration] Should check for output, not error in deleteContainer
Upstream-commit: 40afb853d718358a26b01d6e796f80f8cf0c5728
Component: engine
2017-01-05 13:26:39 -08:00
424f0925a7 Clean some runCommandWithOutput accross integration-cli code
There is still ways to go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 87e3fcfe1e059780c4ee57abb097296fd29e09af
Component: engine
2017-01-05 17:44:31 +01:00
55d4d2f410 Windows: Enable TestBuildWorkdirImageCmd
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 528a5fd2ba02ea8d34cc528cddbd1b5b62a30074
Component: engine
2017-01-04 15:33:40 -08:00
0c3b3bfadc Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 58738cdee327f5de481dcf7d3d377374cbb5f13a
Component: engine
2017-01-04 14:16:42 -08:00
7979981cc5 Add test TestRestartPolicyWithLiveRestore
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 89f034093a771fc1d3d161d23e018c25ae4e2ee3
Component: engine
2017-01-04 14:12:49 -08:00
a6c6e5f892 fix volume ls filter driver
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0fdab496108e8d0945af3dd0130dd9deb09c9b26
Component: engine
2017-01-04 23:29:12 +08:00
8965c03605 Merge pull request #29861 from Microsoft/jjh/tidywinkv
Tidy kernel version in tests
Upstream-commit: 03c17ab66a3d1adc2e6c3e0ac436afe43bcfd3b1
Component: engine
2017-01-04 15:48:20 +01:00
1f42780a09 Should check for output, not error in deleteContainer
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b029d3dee36d2d3c51b66557b4f03e493fe45fee
Component: engine
2017-01-04 11:15:36 +01:00
e7cd6e9e80 support registry mirror config reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 5b9348c553d183bc62f6e7cc8f934766fac162bd
Component: engine
2017-01-04 11:04:00 +08:00
25dd6a8c20 Merge pull request #29733 from cpuguy83/fix_v1plugin_deadlock
Fix race/deadlock in v1 plugin handlers
Upstream-commit: 48ed4f0639d2f290603a04ec146beb3f9569280f
Component: engine
2017-01-03 17:02:15 -08:00
ecc03f8a8a Tidy kernel version in tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b06692b1a94572cd60ca066efc85107b629f30f1
Component: engine
2017-01-03 12:47:25 -08:00
cee6d6487a Merge pull request #29556 from mavenugo/refcount
Fixing a couple of network plugin life-cycle mgmt issues
Upstream-commit: 2ef6d8045415899b3faf8b68c0c732aa8c18917d
Component: engine
2017-01-03 11:13:22 -08:00
eb7043f1ff Merge pull request #25234 from yongtang/25228-service-ps-multiple-ID
Support multiple service IDs on "docker service ps"
Upstream-commit: 18265591c2ae16b2fc831e9922fb27542f97fcf6
Component: engine
2017-01-03 12:40:24 +01:00
44a6bbe938 Add a new request package in integration-cli
The goal is to remove function from `docker_utils.go` and setup
simple, one-responsability package that can be well tested ; and to
ease writing request.

This moves all the calls to `sockRequest` (and similar methods) to
their counterpart in the `request` package.

This introduce `request.Do` to write easier request (with functional
argument to easily augment the request) with some pre-defined function
for the most used http method (i.e. `request.Get`, `request.Post` and
`request.Delete`).

Few of the `sockRequest` call have been moved to `request.Do` (and
`Get`, etc.) to showcase the usage of the package. There is still a
whole lot to do.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d69d4799a312dfcae63442e290ae6667afd1a038
Component: engine
2017-01-03 11:49:30 +01:00
cc2e0536c6 Merge pull request #29827 from vdemeester/integration-fixes-for-userns
Updates some integration tests to fix userns builds
Upstream-commit: de709ebfd891ca44db35353f800d674a8e09a18e
Component: engine
2017-01-03 11:47:39 +01:00
fabb4a866d Merge pull request #29828 from vdemeester/integration-deleteContainer-ignore-notfound
Do not fail in `TearDown` if container not found when removing
Upstream-commit: 275d68ab39c0e880f26910bfda562d8a63e9d766
Component: engine
2017-01-03 11:35:07 +01:00
a520da946c Merge pull request #29773 from forever043/fix_TestDaemonStartWithoutColors
test: Fix "--raw-logs=true" option test in TestDaemonStartWithoutColors
Upstream-commit: 2fd995bc999702bba49a802f7f054f657e1041fb
Component: engine
2017-01-03 09:29:19 +01:00
7cbb50d925 Do not fail in TearDown if container not found when removing
If the container is not found when removing, it means it's already not
there anymore, so it's safe to ignore. This should reduce a bit some
`TearDown` flakyness..

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 636d6ee57c85df086823e998077d83dc0bb94035
Component: engine
2017-01-02 22:14:24 +01:00
c01c194858 Updates some integration tests to fix userns builds
- `TestRunMountReadOnlyDevShm` and `TestRunHostnameInHostMode` needs
  `NotUserNamespace` requirement as these are known limitation of
  userns.
- `TestBuildWorkdirCmd` should use a preload image (`busybox`) instead
  of one that require network access.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: bc19388fb239b1aa761d323405a7d6a6362845f4
Component: engine
2017-01-02 19:13:26 +01:00
9966a465fe Merge pull request #29799 from vdemeester/integration-registry-package
[test-integration] Add a registry package with registry v1/v2 code
Upstream-commit: ed689c48b08f393fbb652681b9b3e859380ae5e3
Component: engine
2017-01-02 15:37:09 +01:00
ee40f7aac0 Add a registry package with registry v1/v2 code
This extract what was in registry_test.go and
registry_mock_test.go. This also move `RegistryHosting`
requirement to `registry.Hosting`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4300e5e8818571a55e00d9987bec3ad6ca92dc6f
Component: engine
2017-01-02 11:03:53 +01:00