Commit Graph

40234 Commits

Author SHA1 Message Date
bb68afd0fc Docs touch-ups for "autoremove" and broken anchor
`--rm` moved to the daemon, so is now also supported
when combined with `-d`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e9ce688d6e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-18 10:17:11 -07:00
ec3221ac7d Merge pull request #512 from thaJeztah/18.03-backport-tests
[18.03] backport updates to tests, and fix empty LogPath with non-blocking logging mode
2018-04-17 14:56:29 -07:00
d602967356 Merge pull request #495 from thaJeztah/18.03-backport-972-fix-merge-network
[18.03] backport Fix error with merge composefile with networks…
2018-04-16 19:04:36 -07:00
a3540962fd Add some tests to the volume store
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 834d0e262ac248191c09bcdb2b86ee92edb6aaf0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:44:33 -07:00
c25858e94c TestLinksEtcHostsContentMatch: use container.Exec()
I am not quite sure why but this test is sometimes failing like this:

> 15:21:41 --- FAIL: TestLinksEtcHostsContentMatch (0.53s)
> 15:21:41 	assertions.go:226:
>
> 	Error Trace:	links_linux_test.go:46
> 15:21:41
> 	Error:      	Not equal:
> 15:21:41
> 	            	expected: "127.0.0.1\tlocalhost\n::1\tlocalhost
> ip6-localhost
> ip6-loopback\nfe00::0\tip6-localnet\nff00::0\tip6-mcastprefix\nff02::1\tip6-allnodes\nff02::2\tip6-allrouters\n172.17.0.2\tf53feb6df161\n"
> 15:21:41
> 	            	received: ""

To eliminate some possible failures (like ignoring stderr from `cat` or
its exit code), let's use container.Exec() to read a file from a container.

Fixes: e6bd20edcbf ("Migrate some integration-cli test to api tests")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ad2f88d8ccbd9dd0a8d9c4f96ece3956f60489df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:44:17 -07:00
ae56939688 Remove unnecessary diff tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 038f3add5191240058c7a4154556553c5493ea44)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:44:09 -07:00
df6211ff9e Remove duplicate TestServiceUpdatePort
The TestAPIServiceUpdatePort test performs exactly
the same steps.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 36e1646e4f010ea033643c6df3d9c3dccc166ed2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:22:15 -07:00
e945f93024 Adds a unit test for plugin request timeout
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 7ca971fb495e4de4aa4455964625974464d86920)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:22:10 -07:00
04ebff9f98 Address expected vs actual in integration tests
This fix addresses `expected` vs `actual` in integration tests
so that they match `assert.Equal(t, expected, actual)`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 8a854e933b3dbb26cfce28b920cff61909412c6f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:22:04 -07:00
b3929fad23 Remove unnecessary container.WithName in kill test
This fix removes several unnecessary `container.WithName`
usage in docker kill integration test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 1778719d6ac166250acfaebe5dd99b5e9d151c3e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:58 -07:00
6fbd783f33 Migrate docker rm tests to api tests
This fix migrates docker rm test in integration-cli
to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit ed58ba99fb28ceac56063b7f003f38b597ddef80)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:53 -07:00
618f290b37 Improvement in integration tests
This fix adds several improvement:
1. No need for explicit ContainerRemove as it has been handled in setupTest()
2. Added `container.WithImage` helper function and used it in commit tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 6ab465804b0b8cec6c5ac278a21151d49e34885d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:48 -07:00
1f529b2bd2 Fixes some integration/container test to run on remote daemon
```
docker build -f Dockerfile.e2e -t moby-e2e .
docker run -v /var/run/docker.sock:/var/run/docker.sock \
           -e TEST_INTEGRATION_DIR=/tests/integration/container \
           -e DOCKER_API_VERSION=1.36 moby-e2e
```

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 18dd1d9aba3c79d355abaa7f498b88ad816f7d04)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:42 -07:00
e695ffea63 Migrate export tests to api tests
This fix migrates export tests in integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 4e702cf70d50ee5b0737270f27d9973fd3084c66)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:36 -07:00
d4444e3446 Fix "expected" and "actual" being reversed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a2517cbf62d75c48861337182aa841c5089f8ac4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:29 -07:00
53a10ae2bc Enhancement of replacing ContainerCreate with helper funcs in tests
This fix is a minor enhancement to replace several ContainerCreate with
helper funcs of `container.Create` in tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 6ad4720c78d6ac61a60a3e7ed1d0c0119c5d103e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:20 -07:00
0fd259afcb Remove docker_cli_secret_inspect_test.go
as the test (TestSecretInspectMultiple) seems to have been covered pretty well in cli:
https://github.com/docker/cli/blob/master/cli/command/secret/inspect_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 3d38adb20c619b87edab72e51ff0fd1cf6e08691)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:12 -07:00
8b54bcc057 Migrate events tests to api tests
This fix migrates events tests in integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 3a749157d2c2b320fea49f7aa4d4eb634f52662f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:06 -07:00
e4022bf934 Migrate config inspect test to api test
This fix migrates config inspect test in integration-cli
to api test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 4b99d782079dc390c2d8fb78f6973bbeee7d8a47)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:21:00 -07:00
bae8ccdbd7 Clean-up after container unit test
Remove temp directories and close file loggers in container unit tests.

Signed-off-by: mnussbaum <michael.nussbaum@getbraintree.com>
(cherry picked from commit 07d5446fe27cb92d881df48be6e8a6510d9608b0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:20:53 -07:00
b2ff741b5f Fix empty LogPath with non-blocking logging mode
This fixes an issue where the container LogPath was empty when the
non-blocking logging mode was enabled. This change sets the LogPath on
the container as soon as the path is generated, instead of setting the
LogPath on a logger struct and then attempting to pull it off that
logger at a later point. That attempt to pull the LogPath off the logger
was error prone since it assumed that the logger would only ever be a
single type.

Prior to this change docker inspect returned an empty string for
LogPath. This caused issues with tools that rely on docker inspect
output to discover container logs, e.g. Kubernetes.

This commit also removes some LogPath methods that are now unnecessary
and are never invoked.

Signed-off-by: junzhe and mnussbaum <code@getbraintree.com>
(cherry picked from commit 20ca612a59c45c0bd58c71c199a7ebd2a6bf1a9e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:20:43 -07:00
89f42b5a6e Migrate some config secret tests to api test
This fix migrates some secret create tests to api tests,
and remove redundant TestConfigCreate.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 99e28188507bbcb925b0c09df6b53cdd882d24c5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:20:28 -07:00
811b93ac9b Move containerIsStopped/containerIsInState to integration/internal/container
This fix moves helper functions containerIsStopped and
containerIsInState to integration/internal/container,
so that they could be used outside of integration/container.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit eda311c18f388ed4541dc44dcfba08cd4347a685)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:20:21 -07:00
fd75fd2b45 Clean the teardown process of network test
We need to clean the resources created in some test cases, else
in some cases we'll get below error for other tests:

> FAIL: docker_experimental_network_test.go:37: DockerNetworkSuite.TestDockerNetworkMacvlanPersistance
>  docker_experimental_network_test.go:44:
> ...
> Command:  ip link add dm-dummy0 type dummy
> ExitCode: 2
> Error:    exit status 2
> Stdout:
> Stderr:   RTNETLINK answers: File exists
> ...

Logically, each test case should be independent, the failure of previous
test case should not have side-effect for the test cases followed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
(cherry picked from commit 57d85e7e54f7d074af8c496cba43ee18d3815207)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:20:14 -07:00
7aa342f808 Update docker-py
This fix update docker-py so that containers from the tests run
could be cleaned up during teardown:
```diff
-ENV DOCKER_PY_COMMIT 5e28dcaace5f7b70cbe44c313b7a3b288fa38916
+ENV DOCKER_PY_COMMIT 8b246db271a85d6541dc458838627e89c683e42f
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 66935a0f64f0a72162fb3919c759f4f500b6c372)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:20:07 -07:00
15237fd242 Migrate several docker rm tests to api tests
This fix migrates several docker rm tests to api tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 6bd4f4801b244555213f0040b9885033e99d4ae8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:20:00 -07:00
1331808a09 Migrate volumes tests in integration-cli to api tests
This fix migrates volumes tests in integration-cli to api tests
in integration/

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit d896f87c0595134fa2f0787dad30b237815f233f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-16 14:19:52 -07:00
dc75023a9a Merge pull request #503 from jose-bigio/18.03_version_bump
[18.03] version bump to 18.03.1-ce-rc1
v18.03.1-ce-rc1
2018-04-11 23:24:42 -07:00
9fb2695fa5 Merge pull request #505 from jose-bigio/18.03_changelog
[18.03] changelog
2018-04-11 23:24:25 -07:00
473116d3a2 Changelog for 18.03.1
Signed-off-by: jose-bigio <jose.bigio@docker.com>
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-04-12 05:33:22 +00:00
f10cbe710b Merge pull request #506 from thaJeztah/18.03-backport-defensive-attachment-processing
[18.03] daemon/cluster: handle partial attachment entries during configure
2018-04-11 21:34:44 -07:00
aff214cf5c Merge pull request #497 from thaJeztah/18.03-backport-fix-manifest-docs-typo
[18.03] [docs] Fix typo in manifest command docs: updated `MANFEST` to `MANIFEST`
2018-04-11 21:32:33 -07:00
4cff440f16 Merge pull request #499 from thaJeztah/18.03-backport-bump-golang-1.9.5
[18.03] bump golang to 1.9.5
2018-04-11 21:28:45 -07:00
5770d86dae Merge pull request #458 from thaJeztah/18.03-backport-resilient-cpu-sampling
[18.03] daemon/stats: more resilient cpu sampling
2018-04-11 21:20:16 -07:00
e921cf31fc Merge pull request #487 from thaJeztah/18.03-backport-update-containerd-1.0.3
[18.03] containerd: update to 1.0.3 release
2018-04-11 19:17:35 -07:00
7ee3cf582d Merge pull request #470 from thaJeztah/18.03-fix-exec-apparmor
[18.03] Fix AppArmor not being applied to Exec processes
2018-04-11 17:48:49 -07:00
8e67119f1f Merge pull request #476 from thaJeztah/18.03-systemd-memlimit
[18.03] Test for systemd cgroupdriver memory setting
2018-04-11 17:47:37 -07:00
59875dbe8e Merge pull request #478 from corbin-coleman/update-changelog
[18.03] Remove update runc line
2018-04-11 17:41:57 -07:00
0190af907b Merge pull request #490 from cpuguy83/18.03_backport_36711
[18.03] Don't sort plugin mounts slice
2018-04-11 17:32:14 -07:00
711807560d Merge pull request #508 from thaJeztah/18.03-backport-LayerLeak
[18.03] Fix Windows layer leak when write fails
2018-04-11 17:31:41 -07:00
d6931c2d12 Fix error with merge composefile with networks…
… and other cases too. Updating mergo fixes the bugs (but introduced a
slight behaviour change that had to be fixed too)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 0122730faf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 14:41:04 -07:00
92f0dce1d1 Fix docker stack deploy reference flag
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 2ee9635b1e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 14:40:52 -07:00
1556d2d2f9 Merge pull request #504 from thaJeztah/18.03-backport-content-trust-tests
[18.03] backport content trust tests, windows, test-refactoring
2018-04-11 14:06:59 -07:00
d8b4bd5c6f Fix Windows layer leak when write fails
Signed-off-by: Darren Stahl <darst@microsoft.com>
(cherry picked from commit 1f28844d7869609f371ab2a7881e4488a79a7e27)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 11:54:18 -07:00
603c7932bb daemon/cluster: handle partial attachment entries during configure
We have seen a panic when re-joining a node to a swarm cluster. The
cause of the issue is unknown, so we just need to add a test for nil
objects and log when we get the condition. Hopefully this can prevent
the crash and we can recover the config at a later time.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 454128c6e82cded211c1412e3eb350b1f7533ee2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 11:46:06 -07:00
7bfd67bece Fix imports in CLI compose test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-11 11:39:36 -07:00
010ba8f1dd Fix test for trust inspect --pretty
This fix was part of 8c3d0b93d6,
but was reverted due to the order in which other changes were
backported.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 17:28:16 -07:00
7dd4bb6171 18.03.1-ce-rc1 version bump
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2018-04-10 15:52:21 -07:00
566c20094c Remove filewatcher
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit c0588a9c8f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:21:13 -07:00
bc28daf367 Add more content trust tests
Importing from moby's DockerTrustSuite tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 8b00c5cfd8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:20:40 -07:00