Commit Graph

4974 Commits

Author SHA1 Message Date
4571efe6b5 Remove docker_api_swarm_secret_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3499557c9b3aa728cb52402c1bb4302f80ab4721
Component: engine
2018-02-11 21:17:25 +00:00
e42b22c770 Merge pull request #36259 from yongtang/02082018-kill_test
Migrate TestKillDifferentUserContainer to api test
Upstream-commit: 2d97f5e7800b43a7ea9106c3c95200c6f4404930
Component: engine
2018-02-09 13:47:35 -08:00
2f849b7e23 Merge pull request #36260 from yongtang/02082018-inspect_test
Migrate docker_api_inspect_unix_test.go to integration api test
Upstream-commit: 5589e9cad1107eb9cf030b73d9375e9a7c84cc47
Component: engine
2018-02-09 13:33:51 -08:00
663c468cfb Merge pull request #36221 from yongtang/02032018-secret_ls
Migrate secret list tests from integration-cli to api tests
Upstream-commit: 9d55eefc1b4553260785c1c09772ccd9660b075f
Component: engine
2018-02-09 13:29:19 -08:00
20c1120c88 Migrate TestKillDifferentUserContainer to api test
This fix migrates TestKillDifferentUserContainer to api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0855922cd3cd1e9d846fd85ef968653ff8649a44
Component: engine
2018-02-09 13:40:32 +00:00
a75949cd5f Migrate docker_api_inspect_unix_test.go to integration api test
This fix migrates docker_api_inspect_unix_test.go to integration api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8197529ca2fabc95b9fc4a7e3ff643740b1f4388
Component: engine
2018-02-09 12:56:07 +00:00
62e1fa1243 Remove docker_cli_secret_ls_test.go from integration-cli
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 42465784dcc61aa69b8fcefe4669d20422471fea
Component: engine
2018-02-09 00:45:08 +00:00
f5f60f4ad4 Migrate rename tests in integration-cli to api tests
This fix migrates rename tests in integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: be24a6b11e36b542d37cf168f6d198d5445803a5
Component: engine
2018-02-08 23:27:14 +00:00
158c963b62 Merge pull request #36241 from yongtang/02072018-create-tests
Migrate TestCreateTmpfsMountsTarget test to api test
Upstream-commit: 15001f83bdb268ce3d4c0191eab39f443cc6ea5c
Component: engine
2018-02-08 14:58:06 -08:00
8aa2823503 Merge pull request #36140 from vdemeester/integration-container-kill
Migrate some kill integration cli test to api tests
Upstream-commit: 21c9e5701bef4687847adb9c26ac42583a57c174
Component: engine
2018-02-08 09:55:28 -08:00
085b7dfcd2 Merge pull request #36235 from yongtang/02072018-info-api-test
Migrates docker info tests to integration api tests
Upstream-commit: 12ff002eedb602f6c8c36d41876dae15e1587849
Component: engine
2018-02-08 09:55:08 -08:00
82570b7d22 Migrate some calls to new client function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6977f468bbcf43864a5acf6c89c331a9180169e5
Component: engine
2018-02-08 16:21:45 +01:00
9887b96613 Move some kill integration cli to api tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2227c8ad5ee2bd2f636651efd4ef70e56c082f85
Component: engine
2018-02-08 15:26:24 +01:00
e09b72af21 Merge pull request #36224 from dnephin/refactor-commit
Refactor Daemon.Commit()
Upstream-commit: 9769ef333f2af24b30fed0dd7b00384b2df3b953
Component: engine
2018-02-08 21:02:30 +09:00
a076c21e0c Remove integration-cli/docker_cli_create_unix_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8331a1a5cf1f7f751fdb011cb9e1aa4b0642c1e5
Component: engine
2018-02-08 00:21:29 +00:00
fd90b16ff5 Merge pull request #36194 from dnephin/add-canonical-import
Add canonical import path
Upstream-commit: 3a633a712c8bbb863fe7e57ec132dd87a9c4eff7
Component: engine
2018-02-07 13:06:45 -08:00
4ec1fd107e Refactor commit
The goal of this refactor is to make it easier to integrate buildkit
and containerd snapshotters.

Commit is used from two places (api and build), each calls it
with distinct arguments. Refactored to pull out the common commit
logic and provide different interfaces for each consumer.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: daff039049aea6e19a4bda1df2834d14b4198bc0
Component: engine
2018-02-07 15:09:06 -05:00
b2efbde0e3 Migrates docker info tests to integration api tests
This fix migrates docker info tests in integration-cli
to integration tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 68d9beedbe0994af5c91022874daa271b657be8c
Component: engine
2018-02-07 18:26:01 +00:00
607349c14f Migrates TestContainersAPINetworkMountsNoChown to api tests
This fix migrates TestContainersAPINetworkMountsNoChown from
integration-cli to api tests in integration.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c028da3557cc0e9f80aee9b08118e9947e1fa57a
Component: engine
2018-02-06 15:56:20 +00:00
4056ff9d7d Merge pull request #36188 from yongtang/02012018-TestSecretInspect
Migrate TestSecretInspect from integration-cli to api tests
Upstream-commit: 30a8c6c1094aca87f62f321ea1420865565f1d04
Component: engine
2018-02-06 15:19:08 +01:00
be83c11fb0 Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
041bf84c58 Migrate TestSecretInspect from integration-cli to api tests
This fix migrates TestSecretInspect from integration-cli to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 71c794d9126dc4b4626cf6ab90267a990c8923f6
Component: engine
2018-02-02 22:23:12 +00:00
08f32bbeb8 Remove integration-cli/docker_cli_nat_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: deae6a5c087eac564dc348fa1f46f57790ed2c84
Component: engine
2018-02-02 18:59:15 +00:00
b9a24cabc1 Merge pull request #36177 from yongtang/02012018-docker_api_resize_test
Migrate several resize tests from integration-cli to integration
Upstream-commit: 81e651c6d2e26df4ed210a5fd87142dcd7a94dd6
Component: engine
2018-02-02 10:27:24 -08:00
fe9238ad21 Migrate TestAPIStatsContainerGetMemoryLimit from integration-cli to api tests
This fix migrates TestAPIStatsContainerGetMemoryLimit from
integration-cli to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d5cbde514f4887f5655096bce05faa7b91068038
Component: engine
2018-02-01 22:07:06 +00:00
02e1927cf7 Remove integration-cli/docker_api_resize_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e8d1f35718b3a9869778611b2cb11c2f4407350f
Component: engine
2018-02-01 16:37:01 +00:00
096bbe0b3e Merge pull request #36166 from yongtang/01312018-TestAPIUpdateContainer
Migrate TestAPIUpdateContainer from integration-cli to api tests
Upstream-commit: 5772c4b8a25dfad869ecd83bb986e2b0d08b7a07
Component: engine
2018-01-31 15:02:00 -08:00
6f8c4ca576 Remove docker_api_update_unix_test.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8786b09c81e4eed540924ef415ecdfb5f9affa01
Component: engine
2018-01-31 16:10:34 +00:00
877ec711a0 Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus
This fix tries to address the issue raised in 36139 where
ExitCode and PID does not show up in Task.Status.ContainerStatus

The issue was caused by `json:",omitempty"` in PID and ExitCode
which interprate 0 as null.

This is confusion as ExitCode 0 does have a meaning.

This fix removes  `json:",omitempty"` in ExitCode and PID,
but changes ContainerStatus to pointer so that ContainerStatus
does not show up at all if no content. If ContainerStatus
does have a content, then ExitCode and PID will show up (even if
they are 0).

This fix fixes 36139.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9247e09944a4c7f3c2f3f20f180c047a19fb6bae
Component: engine
2018-01-31 15:35:19 +00:00
835d51fadd Merge pull request #36148 from yongtang/01302018-TestLinksEtcHostsContentMatch
Migrate some integration-cli test to api tests
Upstream-commit: 5e7a245c3f63a29fb0eb96d8897238b9dd3cfc47
Component: engine
2018-01-30 13:38:15 -08:00
bbb554bc58 Migrate TestAuthAPI from integration-cli to integration
This fix migrates TestAuthAPI from integration-cli to integration

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d9247557898d1d15a7349ecb0044b73d4a5a41a9
Component: engine
2018-01-30 19:15:06 +00:00
6d89c35e6e Migrate some integration-cli test to api tests
This fix migrate  TestLinksEtcHostsContentMatch
to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e6bd20edcbf3b7a6f87a356ab0943714936c70e1
Component: engine
2018-01-30 18:52:48 +00:00
12f9c4b018 Migrate docker_cli_stop_test.go to api test
This fix migrate docker_cli_stop_test.go to api test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4f378124ff649b844de88c93f6ca70e6b3f5d7d7
Component: engine
2018-01-30 00:55:18 +00:00
2096535fce Fixes for libcontainer changes
Libcontainer no longer provides placeholders for
unsupported platforms, which cause the Windows
builds to fail.

This patch moves features that are not supported
to platform-specific files.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d1c34831e930c1f6b3de28cab3f4a358845a79d5
Component: engine
2018-01-18 10:08:12 +01:00
2802ca3c0e Merge pull request #36018 from thaJeztah/remove-deprecated-testenv-functions
Remove deprecated integration-cli/environment functions
Upstream-commit: 8c31aacebff68fe73f4203f86c5681a0fce648f1
Component: engine
2018-01-15 13:24:52 -08:00
de86612508 Merge pull request #36011 from thaJeztah/golint-fixes
Golint and Ineffassign  fixes
Upstream-commit: a44274f1c033004f0aaaa225aa98c58c018623f6
Component: engine
2018-01-15 08:59:58 -08:00
d1c8c580ed Remove deprecated environment.DaemonPlatform()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 18a771a761654e241ae8d1e85aa0c0a6164c5d27
Component: engine
2018-01-15 15:32:06 +01:00
28a714b165 Remove deprecated environment.MinimalBaseImage()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dfedc9ef6214500526c29fbf9a46aca9cecbeb57
Component: engine
2018-01-15 15:31:02 +01:00
d0afa0d404 Remove deprecated environment.ExperimentalDaemon()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: da8032d7d351a2073f54ec0121a796800b6b1a46
Component: engine
2018-01-15 15:30:05 +01:00
de027de052 Remove deprecated environment.DockerBasePath()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 142b1f8bfb3a1459660a5877b48f2bd7d17ba5d6
Component: engine
2018-01-15 15:29:26 +01:00
621388138c Golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4a63139696aea2c73ec361a9af8b36a118f0423
Component: engine
2018-01-15 00:42:25 +01:00
2c5689d728 ineffassign: fix unused variables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 63a0e88e8a61b5c0d5f698d5baf37f568ee01d50
Component: engine
2018-01-13 13:35:10 +01:00
54836718fd busybox: use '-v' option for 'cat'
Use `cat -v` command instead of `catv` for the latest version of
busybox(V1.28.0) with multi-arch

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: ec6659a1216fbfe3fead759b0220501847d12e28
Component: engine
2018-01-11 06:35:17 +00:00
9251d7a17a busybox: Fix ls compatible issue
BusyBox v1.26.2 (2017-03-09 00:04:38 UTC) supports `-le` option
to get the full date and time information, while BusyBox v1.27.2
(2017-11-01 23:22:25 UTC, which is used by the official multi-arch
image, uses `--full-time` instead of `-e` to get the same data. As
a result, we will get below error for the `DockerSuite.TestBuildLastModified`
test case in case of multi-arch image used:

> docker_cli_build_test.go:446:
>     out2 = cli.DockerCmd(c, "run", name, "ls", "-le", "/file").Combined()
>   o/src/github.com/docker/docker/vendor/github.com/gotestyourself/gotestyourself/icmd/command.go:61:
>     t.Fatalf("at %s:%d - %s\n", filepath.Base(file), line, err.Error())
> ... Error: at cli.go:33 -
> Command:  /usr/local/bin/docker run testbuildlastmodified ls -le /file
> ExitCode: 1
> Error:    exit status 1
> Stdout:
> Stderr:   ls: invalid option -- e
> BusyBox v1.27.2 (2017-11-01 23:22:25 UTC) multi-call binary.

This PR tries to fix the above compatible issue for busybox image.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: f88c2c04ef4dbae20eaddeaf69e605878f498041
Component: engine
2018-01-11 06:34:54 +00:00
5c2e02eb8f Removal of TEST_IMAGE_NAMESPACE
We don't need the test image namespace anymore since we've already
upgrade those images to the latest multi-arch ones.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 662bdb4a5638e56d78e66bb2cb5d7a4a751135c9
Component: engine
2018-01-11 05:16:09 +00:00
2a34102708 TestBuildNotVerboseFailureRemote: fix false positive
I got the following test failure on power:

10:00:56
10:00:56
----------------------------------------------------------------------
10:00:56 FAIL: docker_cli_build_test.go:3521:
DockerSuite.TestBuildNotVerboseFailureRemote
10:00:56
10:00:56 docker_cli_build_test.go:3536:
10:00:56     c.Fatal(fmt.Errorf("Test[%s] expected that quiet stderr and
verbose stdout are equal; quiet [%v], verbose [%v]", name,
quietResult.Stderr(), result.Combined()))
10:00:56 ... Error: Test[quiet_build_wrong_remote] expected that quiet
stderr and verbose stdout are equal; quiet [
10:00:56 unable to prepare context: unable to download remote context
http://something.invalid: Get http://something.invalid: dial tcp: lookup
something.invalid on 172.29.128.11:53: no such host
10:00:56 ], verbose [unable to prepare context: unable to download
remote context http://something.invalid: Get http://something.invalid:
dial tcp: lookup something.invalid on 8.8.8.8:53: no such host
10:00:56 ]
10:00:56
10:00:56
10:00:56
----------------------------------------------------------------------

The reason is, either more than one name server is configured, or
nameserver was reconfigured in the middle of the test run. In any case,
different nameserver IP in an error messages should not be treated
as a failure, so let's strip those out.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 3676bd8569f4df28a4f850cd4814e3558d8c03f6
Component: engine
2017-12-28 13:08:41 -08:00
dd0cbe7272 integration-cli/TestCleanupMounts: fix/improve
`TestCleanupMountsAfterDaemonAndContainerKill` was supposedly written
when the container mounts were visible from the host. Currently they
all live in their own mount namespace and the only visible mount is
the tmpfs one for shareable /dev/shm inside the container (i.e.
/var/lib/docker/containers/<ID>/shm), which will no longer be there
in case of `--default-ipc-mode private` is used, and so the test will
fail. Add a check if any container mounts are visible from the host,
and skip the test if there are none, as there's nothing to check.

`TestCleanupMountsAfterDaemonCrash`: fix in a similar way, keeping
all the other checks it does, and skipping the "mounts gone" check
if there were no mounts visible from the host.

While at it, also fix the tests to use `d.Kill()` in order to not
leave behind a stale `docker.pid` files.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: f5e01452d2c2a07bab48b4e05306ef9446770c4a
Component: engine
2017-12-28 13:08:41 -08:00
e25f9d0953 integration-cli/TestRunModeIpcContainer: remove
1. The functionality of this test is superceded by
   `TestAPIIpcModeShareableAndContainer` (see
   integration-cli/docker_api_ipcmode_test.go).

2. This test won't work with --default-ipc-mode private.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 519c06607ca7e8a544afddbd61ad57afe63a98b4
Component: engine
2017-12-28 13:08:41 -08:00
7c289486a2 Merge pull request #35844 from thaJeztah/remove-test-events-limit
Remove TestEventsLimit(), and minor cleanups
Upstream-commit: c753095bf331b5b8904cd58a2072c93a9b815141
Component: engine
2017-12-22 09:23:19 +01:00
ee811e7a56 Merge pull request #35851 from tonistiigi/test-names
integration-cli: clarify multi-stage tests names
Upstream-commit: 89140ac28cc413d0e961016b78addccdca4d3607
Component: engine
2017-12-22 00:25:17 +01:00