This repository was archived by the owner on Oct 13, 2023. It is now read-only.
[18.03] backport updates to tests, and fix empty LogPath with non-blocking logging mode#512
Merged
Merged
Conversation
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 d896f87) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This fix migrates several docker rm tests to api tests Signed-off-by: Yong Tang <yong.tang.github@outlook.com> (cherry picked from commit 6bd4f48) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 66935a0) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 57d85e7) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…ntainer 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 eda311c) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 99e2818) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 20ca612) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Remove temp directories and close file loggers in container unit tests. Signed-off-by: mnussbaum <michael.nussbaum@getbraintree.com> (cherry picked from commit 07d5446) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 4b99d78) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 3a74915) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 3d38adb) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 6ad4720) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit a2517cb) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 4e702cf) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
```
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 18dd1d9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 6ab4658) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 ed58ba9) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 1778719) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 8a854e9) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit 7ca971f) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The TestAPIServiceUpdatePort test performs exactly the same steps. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 36e1646) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Daniel Nephin <dnephin@docker.com> (cherry picked from commit 038f3ad) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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: e6bd20e ("Migrate some integration-cli test to api tests") Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit ad2f88d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit 834d0e2) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
Member
Author
|
Not entirely sure what the failure is in s390x; could it be that there's no more tests in that suite for s390x? https://jenkins.dockerproject.org/job/docker-ce-pr-s390x/549/execution/node/621/log/ |
Contributor
|
I think the error is with getting the image to run the tests: Kicking build again. |
Member
Author
|
s390x failure is https://jenkins.dockerproject.org/job/docker-ce-pr-s390x/550/execution/node/627/log/ |
Member
Author
|
I think that flakiness should be fixed by moby/moby#36511, but I see it needs a rebase |
This was referenced Apr 17, 2018
kolyshkin
pushed a commit
to kolyshkin/docker-ce
that referenced
this pull request
May 10, 2018
Signed-off-by: Harald Albers <github@albersweb.de> Upstream-commit: a2d0b6e122021cfac87a99a46d3d02339552d281 Component: cli
kolyshkin
pushed a commit
to kolyshkin/docker-ce
that referenced
this pull request
May 10, 2018
Fix docker-archive#512 Bash autocompletion works incorrect with inspect Upstream-commit: 718a245b6e6c21b9f3694bb541d5e93fd3ebddaa Component: cli
silvin-lubecki
pushed a commit
to silvin-lubecki/docker-ce
that referenced
this pull request
Jan 24, 2020
Signed-off-by: Harald Albers <github@albersweb.de> (cherry picked from commit a2d0b6e122021cfac87a99a46d3d02339552d281) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
silvin-lubecki
pushed a commit
to silvin-lubecki/docker-ce
that referenced
this pull request
Jan 27, 2020
Signed-off-by: Harald Albers <github@albersweb.de> (cherry picked from commit a2d0b6e122021cfac87a99a46d3d02339552d281) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports for 18.03 of:
expectedvsactualin integration tests moby/moby#36490 Addressexpectedvsactualin integration testsThis PR also contains a fix; I think it would be ok to include that
After this is merged, #468 should be rebased; after that one is merged, there's more changes to the tests we can backport, including the "big one"; moby/moby#36507 Replace testify/assert with gotestyourself/assert