Commit Graph

4810 Commits

Author SHA1 Message Date
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
931aa8f0e2 Remove ConsumeWithSpeed
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1455086c4b922f09777aa49ec26a98c463be6a49
Component: engine
2017-08-22 17:15:26 -04:00
56e5cffbc1 Remove testutil.ReadBody
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f304e72a2e4451b043ab1a73a6c44894333c5c7
Component: engine
2017-08-22 17:15:26 -04:00
5e635809d5 Remove ChannelBuffer
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6a0105b452e604866320aad7e2ad291beb7925b9
Component: engine
2017-08-22 17:15:26 -04:00
594cd7054e Remove ListTar
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6ffbe3f6a893a97f534d535538a646d4b79fed03
Component: engine
2017-08-22 17:15:26 -04:00
524d0fa645 Remove testutil.CompareDirectoryEntries and IsKilled
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6151d55ee7301d2b3800d701a9ce4969848e4d6b
Component: engine
2017-08-22 17:15:26 -04:00
b087533ab3 Remove testutil.ConvertSliceOfStringsToMap
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d30e51495a7b748d0d5e73e1b8c7edf5c584c4ef
Component: engine
2017-08-22 17:15:26 -04:00
5380c10ac4 Pin docker-cli version to the 17.06-ce release version
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: cef786f787dcfd87a50c7d0b7183724ab1242ed8
Component: engine
2017-08-22 14:29:16 -04:00
f14f410ab3 Rebase --chown function for ADD/COPY
Rebases and completes initial PR for (prior: --user) --chown flag for
ADD/COPY commands in Dockerfile.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 19a29f6fcf8354732cface3c656c3a3070230dcb
Component: engine
2017-08-22 13:39:25 -04:00
7cc406aa10 Merge pull request #34572 from krizalys/hyphenless-bind-mount
Dropped hyphen in bind mount where appropriate
Upstream-commit: 28362f11d73b5b72ff9d7eba27cf9f817ec86ef8
Component: engine
2017-08-22 05:11:46 -07:00
4f846a2e15 Use event functions from golang.org/x/sys/windows
Use CreateEvent, OpenEvent (which both map to the respective *EventW
function) and PulseEvent from golang.org/x/sys instead of local copies.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: e942513ac46656c3f54cd103e990e2b7bd5c2b14
Component: engine
2017-08-21 12:58:09 +02:00
1c65c425a3 Merge pull request #34560 from dnephin/remove-some-cli-tests
Remove a couple cli tests, which are now unit tests in docker/cli
Upstream-commit: 361a473121f2cd4e688a3bb71fbeff00aaf674d7
Component: engine
2017-08-19 14:31:05 -07:00
3c66acc139 Dropped hyphen in bind mount where appropriate
Signed-off-by: Christophe Vidal <kriss@krizalys.com>
Upstream-commit: dffa5d6df2e51556edfbcebc4695fdbc0bcc1a90
Component: engine
2017-08-19 21:25:07 +07:00
39c495c1d1 Remove config tests, which are now unit tests in docker/cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c467a112050d595ca0b48122cd4ce81fcf6cefde
Component: engine
2017-08-18 14:24:52 -04:00
de626e10fb Fix golint errors.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9b47b7b1519c5f2138e2933fb1fc459eb00895c0
Component: engine
2017-08-18 14:23:44 -04:00
dc46befdc9 Remove cli-only tests from integration-cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 98d8c96885593f8f085bf9607b7d817e23d7164c
Component: engine
2017-08-17 12:32:49 -04:00
30f1b651e2 Remove string checking in API error handling
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.

Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ebcb7d6b406fe50ea9a237c73004d75884184c33
Component: engine
2017-08-15 16:01:11 -04:00
7eea9c9616 Merge pull request #34109 from yummypeng/rm-link-when-rm-container
Bugfix: Remove links when remove container
Upstream-commit: b6498340b2baa6596553b2b56b43990a365a7b6a
Component: engine
2017-08-15 09:43:00 -04:00
99367ff683 Merge pull request #34087 from kolyshkin/ipcmode
Implement private and shareable ipc modes
Upstream-commit: bb6fc72cd2bd0f194940c7710d8ed8cf3fb99d21
Component: engine
2017-08-14 15:52:21 +02:00
1a431d82d1 Test cases for new ipc modes
These test cases cover various arguments for docker create/run --ipc
option, as well as daemon's --default-ipc-mode cli option and
configuration file parameter.

For the description of container IPC modes, see previous commit.

To run these:

	TESTFLAGS='-check.f IpcMode' make test-integration-cli

[v2: simplify TestDaemonEvents(), add default-ipc-mode presense check]
[v3: add TestDaemonIpcModeVSRestart]
[v4: ipcmode test now uses client lib instead of CLI (except for exec)]
[v5: nitpicks in comments]
[v6: add test case for "none"; fix a typo; simplify TestDaemonEvents() more]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 9a60e1cc874402d10eb7e45f62cce25bf5c41d30
Component: engine
2017-08-14 11:00:26 +03:00
0f9d35cd6f Merge pull request #34000 from dnephin/test-integration-api
Introduce `test-integration` target
Upstream-commit: f34e4d295d5c17a78c33beb14b65e5d001c16968
Component: engine
2017-08-11 10:39:27 -07:00
e443662141 Protect images in the integration/ suite
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5fa134b9061d0b794e9e5b887a8ea4ee15fecb61
Component: engine
2017-08-09 11:02:57 -04:00
43db8c0c15 Introduce test-integration target (and deprecate/freeze test-integration-cli)
This adds a new package `integration` where `engine` integration tests
should live. Those integration tests should not depends on any `cli`
components (except from the `dockerd` daemon for now — to actually
start a daemon).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6b025a8b665f7b976bb2560488ba07f55dbf0fb6
Component: engine
2017-08-09 11:02:57 -04:00
de9b157e25 hide swarm plugins behind experimental flag
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 493002021094d72d405e1cd5bfa10b8080f67920
Component: engine
2017-08-08 18:33:25 -07:00
fae0c281b6 Windows: Add named pipe mount support
Current insider builds of Windows have support for mounting individual
named pipe servers from the host to the guest. This allows, for example,
exposing the docker engine's named pipe to a container.

This change allows the user to request such a mount via the normal bind
mount syntax in the CLI:

  docker run -v \\.\pipe\docker_engine:\\.\pipe\docker_engine <args>

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 54354db850664783918a1fc9d208bcfcf47c28e2
Component: engine
2017-08-07 11:34:36 -07:00