Commit Graph

4834 Commits

Author SHA1 Message Date
dd976e6170 integration-cli/docker_cli_logs_test.go: Wait()
To avoid a zombie apocalypse, use cmd.Wait() to properly finish
the processes we spawn by Start().

Found while investigating DockerSuite.TestLogsFollowSlowStdoutConsumer
failure on ARM (see
https://github.com/moby/moby/pull/34550#issuecomment-324937936).

[v2: don't expect no error from Wait() when process is killed]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 14f0a1888f92667f82bea548bfa2fe4a890a75e8
Component: engine
2017-09-18 11:18:36 -07:00
133eff770e TestLogsFollowSlowStdoutConsumer: fix for slow ARM
We run our CI on Scaleway C1 machine, which is pretty slow,
including I/O. This test was failing on it, as it tried to
write 100000 lines of log very fast, and the loggerCloseTimeout
(defined and used in container/monitor.go) prevents the
daemon to finish writing it within this time frame,

Reducing the size to 150000 characters (75000 lines) should
help avoiding hitting it, without compromising the test case
itself.

Alternatively, we could have increased the timeout further. It was
originally set to 1s (commit b6a42673a) and later increased 10x
(commit c0391bf55). Please let me know if you want me to go that way.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 1bc93bff221bd30e80f776cc620a8937314569ef
Component: engine
2017-09-18 08:47:55 -07:00
c53f4217c9 TestRunSeccompProfileAllow32Bit: fix
Since the update to Debian Stretch, this test fails. The reason is dynamic
binary, which requires i386 ld.so for loading (and apparently it is no longer
installed by default):

> root@09d4b173c3dc:/go/src/github.com/docker/docker# file exit32-test
> exit32-test: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=a0d3d6cb59788453b983f65f8dc6ac52920147b6, stripped
> root@09d4b173c3dc:/go/src/github.com/docker/docker# ls -l /lib/ld-linux.so.2
> ls: cannot access '/lib/ld-linux.so.2': No such file or directory

To fix, just add -static.

Interestingly, ldd can'f figure it out.

> root@a324f8edfcaa:/go/src/github.com/docker/docker# ldd exit32-test
>	not a dynamic executable

Other tools (e.g. objdump) also show it's a dynamic binary.

While at it, remove the extra "id" argument (a copy-paste error I
guess).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 771256b305c8c06fca5eb1d041b60fbe093c0e1b
Component: engine
2017-09-17 22:04:31 -07:00
af2e8abbf0 Merge pull request #34842 from dnephin/fix-integration-on-timeout
[integration-cli] Only attempt to find pid with local daemon
Upstream-commit: c5c0702a4d523071b3e41a13c233b6ec9e261b06
Component: engine
2017-09-16 06:48:18 -07:00
cddfe04f6a LCOW: Implemented support for docker cp + build
This enables docker cp and ADD/COPY docker build support for LCOW.
Originally, the graphdriver.Get() interface returned a local path
to the container root filesystem. This does not work for LCOW, so
the Get() method now returns an interface that LCOW implements to
support copying to and from the container.

Signed-off-by: Akash Gupta <akagup@microsoft.com>
Upstream-commit: 7a7357dae1bcccb17e9b2d4c7c8f5c025fce56ca
Component: engine
2017-09-14 12:07:52 -07:00
f34f36be87 Merge pull request #34332 from clnperez/logrus-revendor
revendor logrus and x/crypto
Upstream-commit: 2a54dc080471476037c87cc6961cc126368ffdd9
Component: engine
2017-09-14 11:29:05 -07:00
97847089f1 revendor logrus and x/crypto
this fixes the issue that was blocking a test from running on ppc64le.
the logrus revendor changes the color code used in that same test, so
that breaks the test for all platforms (updated in this pr)

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Upstream-commit: 008b217844f8738cc47ef9ff108dc41dc37736cc
Component: engine
2017-09-14 11:05:47 -05:00
1546d32eb0 Only attempt to find pid with local daemon
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 014cecda464fb1171e613676e0a8a85c02ec1674
Component: engine
2017-09-14 12:05:18 -04:00
c95e22b252 Merge pull request #34837 from tophj-ibm/switch-hub-test-to-alpine
[integration-cli] fix p/z HubPullSuite tests
Upstream-commit: 3a081f53c150190201ddb05c97344ed5071446b0
Component: engine
2017-09-14 18:02:13 +02:00
023fe0b32f [integration-cli] fix p/z HubPullSuite tests
This test tries to pull all the tags in the busybox repo and looks to see
if there were more than two images pulled. This was failing on
p/z due to the recent change to manifest lists, where one of the busybox
tags didn't have a p/z manifest in it's manifest list.

This error seems fine to me, so I changed the test to see if pull fails,
it fails with the "manifest not found" error.

Also switched from busybox -> alpine, because it has significantly less tags,
and the images are close in size.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 5739ba1b918402b8eda748ac2f5dd7ce00f2e69f
Component: engine
2017-09-14 09:42:09 -04:00
93617a3f74 Merge pull request #34784 from dnephin/fix-client-not-found
Cleanup client not found errors
Upstream-commit: bb0e8ee51c8940c3ce23e4f594068612203c6139
Component: engine
2017-09-14 12:04:56 +02:00
c30f13232a Merge pull request #34686 from mion00/templating-node-hostname-support
Add support for .Node.Hostname templating in swarm services
Upstream-commit: 2ee8ef864f9fb9c31848fe10a61605a39fb81635
Component: engine
2017-09-13 21:06:11 -07:00
806d838e90 LCOW: Spot fix for multi-os image pulling
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b291f5a31728f7ff6386bb37f15e7c0885d3b2a7
Component: engine
2017-09-12 23:33:34 -07:00
ee7b60968b Cleanup client not found errors.
And fix remove calls to return a notFound error

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 81bb9978ab5ac99e84a5bf62d0d469f0aec1d506
Component: engine
2017-09-11 19:53:18 -04:00
b543555e86 Merge pull request #34761 from dnephin/fix-mount-create-api-test
Some cleanup of mount create API test
Upstream-commit: bf3a8bddeb5e1ae04b6f73bfe811372ee3e78e36
Component: engine
2017-09-07 17:09:19 -04:00
2e7d5b113f Merge pull request #34757 from dnephin/fix-test-run-environment
Fix TestRunEnvironment
Upstream-commit: d76f0d4e0694f5adcaab327e801ee8553620c5b3
Component: engine
2017-09-07 11:28:57 -07:00
d7504f67d1 Merge pull request #34738 from wgliang/optimization1
Optimize some wrong usage and spelling
Upstream-commit: 2dcb77b24c80dd95b52358c92436f68f2a33eb01
Component: engine
2017-09-07 09:45:14 -07:00
a8b7a6b071 Merge pull request #34730 from simonferquel/fix-TestEventsOOMDisableTrue-flakkyness
Events CLI tests: fix flakyness of TestEventsOOMDisableTrue
Upstream-commit: 72eb1d0a47488d279df2b80bfd3f6091eaff66a7
Component: engine
2017-09-07 11:16:37 +02:00
eec1d4ef54 Optimize some wrong usage and spelling
Signed-off-by: wgliang <liangcszzu@163.com>
Upstream-commit: 94cefa21459a0c620e5a9c2da04df6d3a43dae17
Component: engine
2017-09-07 09:44:08 +08:00
567b25fb28 Some cleanup of mount create API test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 58b96aced87b33c4175fa5d3422289f763ab599d
Component: engine
2017-09-06 19:32:35 -04:00
11b376603e Fix a bad assumption
If the empty variable happens to be sorted to the end of the list then TrimSpace()
would remove it. Instead only strip the single trailing newline.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fff605c3b3557acf6bf793813d695fba59d7fa21
Component: engine
2017-09-06 17:32:56 -04:00
33179f56a2 force inspect test format
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 8e6567cb837e1c885de5146517557c7a5d8a5f17
Component: engine
2017-09-05 08:31:44 -07:00
30986cbc05 Avoid failing the test if container is already stopped
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: adf75503dba2e782139173c011999eacd0c3d7e2
Component: engine
2017-09-05 17:19:57 +02:00
55c903723c Add support for .Node.Hostname templating in swarm services
Signed-off-by: Carlo Mion <mion00@gmail.com>
Upstream-commit: e2f09fa6dd1705eb69ab97fbf759253a4162228a
Component: engine
2017-09-02 10:06:16 +02:00
6742eeff7c Remove assertions that were testing CLI behaviour.
These tests will be moved to docker/cli

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6590ee0dfba45d7eb4ee12f72621b90294925f20
Component: engine
2017-08-31 18:19:17 -04:00
c7214e3099 Merge pull request #34656 from dnephin/move-testenv-to-internal
Move integration-cli/environment to an internal package
Upstream-commit: 184cea5ff710abde25547749e5608b24a255ba09
Component: engine
2017-08-31 08:52:24 -07:00
98aa729835 Merge pull request #34554 from dnephin/use-release-version-of-docker-cli
Pin docker-cli version to the 17.06-ce release version
Upstream-commit: e23965d620e1655f44d47edd8b5e08c2c384fd03
Component: engine
2017-08-30 13:43:39 -04:00
9f71faec7e Refactor test environment
split all non-cli portions into a new internal/test/environment package

Set a test environment on packages instead of creating new ones.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f85ef42ea538911c82821ab6cc0166d492e9a379
Component: engine
2017-08-30 13:13:18 -04:00
511c42a159 Update fixtures/load to use the APIClient
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 61e7d0595d0838671570fbaef21f35a4a41faed7
Component: engine
2017-08-30 13:11:06 -04:00
55ca4eff51 Merge pull request #33684 from dnephin/update-service-ps-tests
Update service ps to be an API test
Upstream-commit: 15b8d0420b57776028875dbf89fc6d9dbb0666e2
Component: engine
2017-08-29 09:44:20 +02:00
f0c0f969b6 integration-cli: fix testutil refactor merge conflict
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ba6f9e4cc9687dd1ccd1ab304b363ed578c6d908
Component: engine
2017-08-28 10:19:54 -07:00
ef16add9bb Merge pull request #34263 from estesp/chown-flag-add-copy
Add --chown flag to ADD/COPY commands
Upstream-commit: a1183dda578f531ef65766611f9e16a0636e3a17
Component: engine
2017-08-28 09:50:44 -07:00
1057cf80e4 Replace service ps cli tests with service inspect API test.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6cd6d8646a90fa2013416bc8f11bd78d72c4180d
Component: engine
2017-08-25 17:27:41 -04:00
402a69d8fb Cleanup daemon.LoadBusybox() to use the API instead of client
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 98a4613017df2b7de045d93e25a376fd00baeb0c
Component: engine
2017-08-25 17:24:25 -04:00
e8bff97a66 Update tests to use icmd
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 92427b3a8146e048c4b85e5ece1530da97d8472d
Component: engine
2017-08-25 12:07:30 -04:00
8ae7aa2322 Merge pull request #34583 from tklauser/win-event-functions
Use windows event functions from golang.org/x/sys/windows
Upstream-commit: 2cea2f5469871c16564c900c5b27cee102ebff0b
Component: engine
2017-08-25 07:43:03 -07:00
9f8c4fc433 Merge pull request #34614 from dnephin/remove-pkg-testutil-tempfile
Remove pkg testutil tempfile
Upstream-commit: ff6fbe224f8b490b05f8489e5ae3219126d8017b
Component: engine
2017-08-24 15:24:15 -07:00
51ed00caab Merge pull request #34627 from estesp/no-userns-plugin-upgrade-test
Turn off plugin upgrade test when userns on
Upstream-commit: 0f957d2c09af7216d839f267c14db86d9194b5d0
Component: engine
2017-08-24 15:04:44 -07:00
ffac489c66 Merge pull request #34626 from kolyshkin/ipcmode-samehost
docker_api_ipcmode_test: add SameHostDaemon req
Upstream-commit: acd2995143023805f890677eef05849211410c4d
Component: engine
2017-08-24 13:01:26 -07:00
4d6d2b530e Turn off plugin upgrade test when userns on
Until volume plugins can be made aware of the remapped root,
interactions with volumes created by plugin will not work as the file
ownership denies permissions to the userns remapped range.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: b1ced2af03c5a8009c314bde80b5f2516e0522fd
Component: engine
2017-08-24 10:52:11 -07:00
80c42a7f96 Merge pull request #33534 from sbko/31410-replace-deprecated-sockrequest
Stop using deprecated SockRequest
Upstream-commit: eb52bb22a4f3b9632545f10c0a3af436aced817d
Component: engine
2017-08-24 11:30:13 -04:00
42d094ea01 docker_api_ipcmode_test: add SameHostDaemon req
This is needed for tests that do some checks and/or create files
on the host system. Inspired by commit d9f3548a9.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 8a9878081f8e14a54067f249bc98ae66f0b61ba3
Component: engine
2017-08-24 17:02:21 +03:00
b03ce80e95 Update tests to use gotestyourself/fs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 60672382c7eb1f65e063c4bf07b0880559cea91b
Component: engine
2017-08-23 17:25:00 -04:00
e48013ec36 Stop using deprecated SockRequest
Signed-off-by: Stanislav Bondarenko <stanislav.bondarenko@gmail.com>
Upstream-commit: 0fd5a654280ef509a6512f84981f28d559869b90
Component: engine
2017-08-23 17:10:04 -04:00
95903f50f1 Host-mode IPC sharing not possible in a userns
This test is the API version of a docker_cli_run_test that was already
disabled from userns, but when ported to API didn't retain the same test
requirements. Specifically, a user namespaced process will not have
access to the host namespace's IPC devices and is already documented as
such in the user namespace restrictions docs.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: d9f3548a936991594095c12b7271ce3387f4025c
Component: engine
2017-08-23 10:37:47 -07:00
eec82cc7b5 Merge pull request #34600 from dnephin/remove-pkg-testutil
Remove pkg/testutil/utils.go
Upstream-commit: 59e1565565071da160a0ad3781335e4f974f93f8
Component: engine
2017-08-23 09:38:20 -07:00
b680839840 *: normalize the use of normalize
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: ae8dbeaeedce3a9f247f2d58df7459f9d79bde5d
Component: engine
2017-08-22 15:25:31 -07:00
f5c5b5cc38 Remove RunCommandPipelineWithOutput
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e885af2a6b6b9f88a8b419d225b1425ec3d9416e
Component: engine
2017-08-22 17:15:26 -04:00
e13afe9c59 Remove RandomTmpDirPath
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9db68f4dea6379b7e85ee5c6f2be080a6fcbe4ca
Component: engine
2017-08-22 17:15:26 -04:00
3177188cce Remove testutil.ParseCgroupPaths
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e8bd67181533222c192cca19a4279c85db48875e
Component: engine
2017-08-22 17:15:26 -04:00