Commit Graph

5129 Commits

Author SHA1 Message Date
026f5ba367 Merge pull request #175 from thaJeztah/18.09_backport_fix_testrunbindmounts
[18.09 backport] Windows (pre RS5) disableTestRunBindMounts
Upstream-commit: 1782e74e54d32a709140cf88545046bc5478e208
Component: engine
2019-03-20 09:27:32 -07:00
b95571e881 Windows (pre RS5) disableTestRunBindMounts
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 9d2e97ac6e20b17477947fc63e70299938606a38)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 91703956dffcf1d9c997aea83f9489a8c768412d
Component: engine
2019-03-20 10:58:15 +01:00
90370524f3 Windows:Fix TestRunUserDefaults
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 80fce6d747c5208b42e94ac9e3f22cef28dd8afe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fd4670161de8f9947c524138c477177f935c98f2
Component: engine
2019-03-19 21:18:53 +01:00
9a1f0b6385 Windows: Bump busybox to v1.1
Signed-off-by: John Howard <jhoward@microsoft.com>

This is a follow-on from https://github.com/moby/moby/pull/38277
but had to be done in a couple of stages to ensure that CI didn't
break. v1.1 of the busybox image is now based on a CMD of "sh"
rather than using an entrypoint. And it also uses the bin directory
rather than `c:\busybox`. This makes it look a lot closer to the
Linux busybox image, and means that a couple of Windows-isms in
CI tests can be reverted back to be identical to their Linux
equivalents.

(cherry picked from commit 561e0f6b7fc256c160292b32695cf1d6150741db)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 613c2f27ed2e7d65474c2f3e786d9e24e757d99d
Component: engine
2019-02-25 10:44:48 +01:00
2012f67a6d Merge pull request #143 from thaJeztah/18.09_backport_skip_kmem_tests_on_rhel
[18.09 backport] Skip kernel-memory tests on RHEL/CentOS daemons
Upstream-commit: 6b0ba3745d073717887ead912c3c7dea4c99fc45
Component: engine
2019-02-20 18:23:09 -08:00
c9de39ca94 Disabled these tests on s390x and ppc64le:
- TestAPISwarmLeaderElection
- TestAPISwarmRaftQuorum
- TestSwarmClusterRotateUnlockKey

because they are known to be flaky.

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 02157c638ba0c325d8fd1debc1678e7e99eacfc1)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 278f1a130b66de23f07e472792b70b640f777666
Component: engine
2019-02-20 13:51:17 -08:00
f2977c7888 Skip kernel-memory tests on RHEL/CentOS daemons
RHEL/CentOS 3.10 kernels report that kernel-memory accounting is supported,
but it actually does not work.

Runc (when compiled for those kernels) will be compiled without kernel-memory
support, so even though the daemon may be reporting that it's supported,
it actually is not.

This cause tests to fail when testing against a daemon that's using a runc
version without kmem support.

For now, skip these tests based on the kernel version reported by the daemon.

This should fix failures such as:

```
FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_run_unix_test.go:499: DockerSuite.TestRunWithKernelMemory

assertion failed:
Command:  /usr/bin/docker run --kernel-memory 50M --name test1 busybox cat /sys/fs/cgroup/memory/memory.kmem.limit_in_bytes
ExitCode: 0
Error:    <nil>
Stdout:   9223372036854771712

Stderr:   WARNING: You specified a kernel memory limit on a kernel older than 4.0. Kernel memory limits are experimental on older kernels, it won't work as expected and can cause your system to be unstable.

Failures:
Expected stdout to contain "52428800"

FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:125: DockerSuite.TestUpdateKernelMemory

/go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:136:
    ...open /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go: no such file or directory
... obtained string = "9223372036854771712"
... expected string = "104857600"

----------------------------------------------------------------------
FAIL: /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:139: DockerSuite.TestUpdateKernelMemoryUninitialized

/go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go:149:
    ...open /go/src/github.com/docker/docker/integration-cli/docker_cli_update_unix_test.go: no such file or directory
... value = nil
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1e1156cf67233cf8eaee2da9c17465ff0d9c2aa0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e042692db1316a60be35bfdca10d7e08d20f50ad
Component: engine
2019-01-05 09:53:31 +01:00
530db7f45a Tweak bind mount errors
These messages were enhanced to include the path that was
missing (in df6af282b9048dfedcd7b7a9a89126aca887f4e1), but
also changed the first part of the message.

This change complicates running e2e tests with mixed versions
of the engine.

Looking at the full error message, "mount" is a bit redundant
as well, because the error message already indicates this is
about a "mount";

    docker run --rm --mount type=bind,source=/no-such-thing,target=/foo busybox
    docker: Error response from daemon: invalid mount config for type "bind": bind mount source path does not exist: /no-such-thing.

Removing the "mount" part from the error message, because
it was redundant, and makes cross-version testing easier :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 574db7a53782c57554089c9606505af1c108df0b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b499acc0e834e11882909269238407c65f68f034
Component: engine
2018-09-28 14:35:55 +02:00
3be9a1e274 fix daemon tests that were using wrong containerd socket
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 52b60f705ca3f12df01b0cf1002860b842770c74)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 6bf8dfc4d89461228031a595d63482b9603c8899
Component: engine
2018-09-25 23:09:25 +00:00
b48ad13f28 Remove 'docker-' prefix for containerd and runc binaries
This allows to run the daemon in environments that have upstream containerd installed.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 34eede0296bce6a9c335cb429f10728ae3f4252d)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b3bb2aabb8ed5a8af0a9f48fb5aba3f39af38e0d
Component: engine
2018-09-24 22:35:36 +00:00
3736c7fe0e Disable TestExecWindowsOpenHandles on RS5 temporarily
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 15a25f6eb94d0f033045fadc3b8beedcb32e426f
Component: engine
2018-08-20 19:48:20 -07:00
0b5da3a767 integration-cli: error report improvements
1. After running d.Cmd(), in case an error is returned, it makes sense
to print command output, as its stderr may contain a clue about what
went wrong. This is by no means complete, just as far as I could go.

2. In case the comment in c.Assert is a constant string, it's better
to provide it as a comment which will be printed.

3. An arbitrary string should not be passed on to a function expecting
%-style formatting. Use %s to fix this.

4. Print the output string before transformation, not after.

5. Unify the output format (drop "out:" prefix").

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ac038eab298eeecab55a62440de302e3bb3f4889
Component: engine
2018-08-14 12:52:30 +03:00
fe821da2fd integration: use %s for check.Commentf()
It is wrong to pass an arbitrary string to a function expecting
%-style formatting. One solution would be to replace any % with %%,
but it's easier to just do what this patch does.

Generated with:

for f in $(git grep -l 'check.Commentf(out)'); do \
	sed -i -e 's/check\.Commentf(out)/check.Commentf("%s", out)/g' $f; \
done

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 83363fb2d4d97d952a0052d079faa8ae39aa20b6
Component: engine
2018-08-14 10:45:39 +03:00
a055aa9d40 Migrate some ipc container test from integration-cli to integration
This fix migrates some ipc container tests from integration-cli
to integration test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 80c92c9b692b79273200b6e37f14a6d4e984ab8d
Component: engine
2018-08-01 21:51:45 +00:00
5483ae0078 Merge pull request #37573 from thaJeztah/windows-rs3-ci
Temporarily disable failing tests on Windows RS3
Upstream-commit: 27f663a2532bb1b4c7fc375f8597d08064ce1890
Component: engine
2018-08-01 12:16:12 +02:00
546812f824 Merge pull request #37438 from adshmh/fix-flaky-test-TestRunContainerWithBridgeNone
fix the race condition in the integration test TestRunContainerWithBridgeNone
Upstream-commit: 9149ef67be8ac945d68fafb16a1aa4ccb2f72249
Component: engine
2018-08-01 09:57:29 +02:00
ef87b4e0a0 Temporarily disable failing tests on Windows RS3
Signed-off-by: John Stephens <johnstep@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1b05ea472703ddc47ec5052bc031fc23e60356c4
Component: engine
2018-07-31 23:49:36 +02:00
82168dfb82 Revert "migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service"
This reverts commit fbaef1b0d3c5656a8aa5f0424b89c118ca277427.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c2e3657b17d8a1fcb80d39e92bdea1a478f82f34
Component: engine
2018-07-27 17:35:52 +02:00
cfcd7a95da migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: fbaef1b0d3c5656a8aa5f0424b89c118ca277427
Component: engine
2018-07-25 14:49:02 -04:00
4a2ba80f95 Merge pull request #37457 from adshmh/migrate-docker_cli_config_create_test-integration-tests-to-integration-config
moved integration tests from docker_cli_config_create_test.go to integration/config
Upstream-commit: a5495f289aafafac8a01c62f2a9cb44856658ece
Component: engine
2018-07-16 14:00:44 +02:00
14ed98c1a4 moved integration tests from docker_cli_config_create_test.go to integration/config
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 0e57ceae0dd42491ed81538bf4d9164218080b66
Component: engine
2018-07-13 17:29:02 -04:00
5fea4ae591 Fix flakyness in TestDockerNetworkInternalMode
Instead of waiting for the DNS to fail, try to access
a specific external IP and verify that 100% of the pakcets
are being lost.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: a2bb2144b3e0d49ac615976bfac462a307d85f0e
Component: engine
2018-07-13 11:43:38 -07:00
882263fbf1 Merge pull request #37422 from thaJeztah/fix-linting-errors
Fix some golint and ineffassign issues
Upstream-commit: f9470d8189e25c297c6c7bd9ac592b6e5acd951e
Component: engine
2018-07-13 00:25:46 +02:00
dc41641256 Fix error string in docker CLI test
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
Upstream-commit: 76ace9bb5e2c5ecdd02046956ab00f76c3b25a3a
Component: engine
2018-07-11 23:02:44 -07:00
a174fffcfe Fix ineffassign linting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ddd8a6572d36a6d0db2aa21d697018f419a7b424
Component: engine
2018-07-11 22:18:45 +02:00
efc55d460d fixed the race condition in the integration test TestRunContainerWithBridgeNone
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 7cda9d8e97c3c82bad13fec9f1727a7de28609b2
Component: engine
2018-07-11 10:37:00 -04:00
c8c1e95dc9 Merge pull request #37394 from yongtang/07052018-ipcmode
Migrate some ipcmode tests to integration
Upstream-commit: aba2735e3fe66333ac1064bed3b476f30b1d1c00
Component: engine
2018-07-06 10:00:03 +02:00
bf53bc318d Migrate some ipcmode tests to integration
This fix migrates some ipcmode tests in integration-cli
to integration tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e0403604e26868b1546a766ab0b40b6cb1677ee6
Component: engine
2018-07-04 16:32:18 +00:00
08169a61e4 Update tests w/ new libnetwork contraints
The TestDockerNetworkIPAMMultipleNetworks test allocates several
networks simultaneously with overlapping IP addresses.  Libnetwork now
forbids this.  Adjust the test case to use distinct IP ranges for the
networks it creates.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: efb7909befa0fe2236148543a6d50e2563bf386c
Component: engine
2018-06-29 15:15:52 -04:00
3c9ebe0c45 Merge pull request #37293 from adshmh/migrate-TestNetworkCreateDelete-to-integration
migrate TestAPINetworkCreateDelete from integration-cli/ to integration/
Upstream-commit: af626ba08a4e11b0e140e7512ac2740b09833c29
Component: engine
2018-06-21 19:08:08 -07:00
e1cb6f43e5 Fix TestDaemonNoSpaceLeftOnDeviceError
This test is testing if any "no space left on device" errors
that occur during `docker pull` will not be masked by other
errors. To test for this, a new loopback-device was created,
and used as `--data-dir` ("/var/lib/docker").

However, `/var/lib/docker` is used for storing various
other things, including a `cache.db` database, used by
BuildKit, which is created during startup of the daemon.
Creation of that file failed (due to `--data-dir` path
being on a mount with limited size), which caused daemon
start to fail before the test was able to run.

This patch changes the size-limited mount to be used for
the storage-driver directory only, so that the test is
not affected by other parts of the code attempting to
write files in it.

To have a predictable path; the daemon used in this test
is configured to use the `vfs` storage-driver.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 754aeb28fdb9dd3aafb7705224e57f28281db264
Component: engine
2018-06-19 16:14:12 -07:00
79590fda36 migrate TestAPINetworkCreateDelete from integration-cli/ to integration/
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: f5426214295cb59d54ece5a24d4720e31947981b
Component: engine
2018-06-15 16:06:45 -04:00
4cadaa03f8 Update tests to use gotest.tools 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 38457285242e57306c5b7ee652c7ccbb9fbd6713
Component: engine
2018-06-13 09:04:30 +02:00
e027a9c59e Merge pull request #37151 from tonistiigi/experimental-buildkit
Experimental BuildKit support
Upstream-commit: c752b0991e31ba9869ab6a0661af57e9423874fb
Component: engine
2018-06-12 13:31:48 -07:00
36f219fce9 Upgrade imdario/mergo to v0.3.5
Mainly to get inline with `docker/cli` version of that dependency

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f929f15dd6e316402394143eeb60ad9ba95a81cb
Component: engine
2018-06-11 15:30:46 +02:00
f05bfde667 integration-cli: fix error message for non-buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b1942bc015f0ec6258c39748032171c09bf562ab
Component: engine
2018-06-10 10:05:31 -07:00
e010ecad6a integration-cli: fix health test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 1f09adbe163f008e36dffa45c8f4b43605d7426e
Component: engine
2018-06-10 10:05:29 -07:00
b617d4ac86 builder: have TestBuildDockerignoringBadExclusion pass with buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 9cc49b4ab91d1083932b952dec7475c46732b5b5
Component: engine
2018-06-10 10:05:28 -07:00
6f67597200 builder: Add TODOBuildkit test requirement, specifically for TestBuildCancellationKillsSleep
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 60a911dfcab2304825e4e8f53999866cfc42d4d8
Component: engine
2018-06-10 10:05:28 -07:00
1986a1408c Merge pull request #37172 from zq-david-wang/resizefix2
Fix race condition between exec start and resize.
Upstream-commit: 5e11f66cb6de472d11647e8b1a744afc941859ad
Component: engine
2018-06-08 15:43:25 -07:00
87cfb7e0a8 Fix race condition between exec start and resize
Signed-off-by: David Wang <00107082@163.com>
Upstream-commit: e6783656f917c5a8b8c6f346b4ff840d97b1b6ce
Component: engine
2018-06-08 11:07:48 +08:00
2452577cb1 Merge pull request #37194 from AntaresS/fix-test-failure
fix a failed test
Upstream-commit: ca25df3b54300e897d96029dcc4f86b8c4215a27
Component: engine
2018-06-05 02:38:04 +02:00
0e7017a3ae Merge pull request #36688 from cpuguy83/volumes_service
Extract volume interaction to a volumes service
Upstream-commit: 5037c5a8ce762b46638378b7a7d1081572eadba1
Component: engine
2018-06-05 02:16:20 +02:00
82d56e0c15 fix a failed test
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 1d9973c0d4c51362e8c5b38e585a025c90baf085
Component: engine
2018-06-04 14:29:00 -07:00
2f23577c7a vendor: use dockerfile parser from buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c9ebd2f13b3aab49c2d90cc38dcf2cd0d059697f
Component: engine
2018-06-02 11:10:34 -07:00
2c7c1d708b Alternative failure mitigation of TestExecInteractiveStdinClose
Begin to copy the data until the command to exit and any coping to
stdin or copy from stdout/stderr has completed.
Also adding defense code to trim the possible '\x00' null value.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 386e0f36c42593ef434517448ccfac5262f958d6
Component: engine
2018-05-28 11:25:31 +08:00
feb51dbad1 Extract volume interaction to a volumes service
This cleans up some of the package API's used for interacting with
volumes, and simplifies management.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e4b6adc88e967971de634596654d9bc33e7bd7e0
Component: engine
2018-05-25 14:21:07 -04:00
0f96e98e12 Various code-cleanup
remove unnescessary import aliases, brackets, and so on.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f23c00d8701e4bd0f2372a586dacbf66a26f9a51
Component: engine
2018-05-23 17:50:54 +02:00
66dfe0e944 TestContainerAPITop: fix flakyness
The following failure is seen in CI from time to time:

> FAIL: docker_api_containers_test.go:435: DockerSuite.TestContainerAPITop
>
> docker_api_containers_test.go:453:
>     c.Assert(top.Processes[0][10], checker.Equals, "/bin/sh -c top")
> ... obtained string = "top"
> ... expected string = "/bin/sh -c top"

The test case expects two processes in the output:

1. /bin/sh -c top
2. top

in the given order.

Now, "ps aux" output is sorted by PID*, and so since the "top" is a child
of "/bin/sh -c top" it has a higher PID and will come second as expected
by the test... unless the PIDs on the system are exhausted and PID rollover
happens, in which case PID of "top" will be lower than that of "/bin/sh".

Fix: sort output by process name.

* - in fact it is not sorted, but is being printed in the same order as
    the kernel list PID entries in /proc directory, which appears to be
    sorted by PID (see ls -1 -U /proc).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 0823ab70990fa4cbf520726013e75c264e6c5231
Component: engine
2018-05-22 18:11:36 -07:00
717e3937b9 more fixes on integration
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: b9b4f888703a20ddd7670c1b978dcb1621fa210f
Component: engine
2018-05-22 11:25:25 -07:00