-
Notifications
You must be signed in to change notification settings - Fork 421
[18.09 backport] assorted test-fixes #401
[18.09 backport] assorted test-fixes #401
Conversation
|
70d1bd5 to
fee45b5
Compare
|
Failures: https://ci.docker.com/public/job/engine/job/PR-401/5/execution/node/164/log/?consoleFull |
Some messages are logged before the logrus format was set, therefore resulting in inconsistent log-message formatting during startup; Before this patch; ``` dockerd --experimental WARN[0000] Running experimental build INFO[2018-11-24T11:24:05.615249610Z] libcontainerd: started new containerd process pid=132 INFO[2018-11-24T11:24:05.615348322Z] parsed scheme: "unix" module=grpc ... ``` With this patch applied; ``` dockerd --experimental WARN[2018-11-24T13:41:51.199057259Z] Running experimental build INFO[2018-11-24T13:41:51.200412645Z] libcontainerd: started new containerd process pid=293 INFO[2018-11-24T13:41:51.200523051Z] parsed scheme: "unix" module=grpc ``` Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 1edf943) Signed-off-by: Sebastiaan van Stijn <[email protected]>
…egration/container package Signed-off-by: Arash Deshmeh <[email protected]> (cherry picked from commit 7073aa8) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Test changes, taken from 596cdff git cherry-pick -s -S -x 596cdff git reset -- \ api/server/router/container/container_routes.go \ api/swagger.yaml \ api/types/mount/mount.go \ container/mounts_unix.go \ daemon/cluster/convert/container.go \ daemon/oci_linux.go \ daemon/volumes_unix.go \ volume/mounts/linux_parser.go \ docs/api/version-history.md \ integration/container/mounts_linux_test.go git checkout -- \ api/server/router/container/container_routes.go \ api/swagger.yaml \ api/types/mount/mount.go \ container/mounts_unix.go \ daemon/cluster/convert/container.go \ daemon/oci_linux.go \ daemon/volumes_unix.go \ volume/mounts/linux_parser.go \ docs/api/version-history.md \ integration/container/mounts_linux_test.go mount: add BindOptions.NonRecursive (API v1.40) This allows non-recursive bind-mount, i.e. mount(2) with "bind" rather than "rbind". Swarm-mode will be supported in a separate PR because of mutual vendoring. Signed-off-by: Akihiro Suda <[email protected]> (cherry picked from commit 596cdff) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Andrei Vagin <[email protected]> (cherry picked from commit bd4fff3) Signed-off-by: Sebastiaan van Stijn <[email protected]>
A container checkpoint directory doesn't have config.json. Signed-off-by: Andrei Vagin <[email protected]> (cherry picked from commit 0b96bf8) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 23fec50) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Line 30: warning: context.Context should be the first parameter of a function (golint) Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit caec45a) Signed-off-by: Sebastiaan van Stijn <[email protected]>
``` Line 25: warning: context.Context should be the first parameter of a function (golint) Line 44: warning: context.Context should be the first parameter of a function (golint) Line 52: warning: context.Context should be the first parameter of a function (golint) ``` Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit b4c46b0) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Line 59: warning: context.Context should be the first parameter of a function (golint) Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 9f9b429) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Line 30: warning: context.Context should be the first parameter of a function (golint) Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 123e29f) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Line 441: warning: context.Context should be the first parameter of a function (golint) Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit dac5710) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Tibor Vass <[email protected]> (cherry picked from commit a281289) Signed-off-by: Sebastiaan van Stijn <[email protected]>
This reverts commit 584c085. Signed-off-by: Sebastiaan van Stijn <[email protected]>
This reverts commit 614daf1. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Looks like TestServiceWithDefaultAddressPoolInit is failing randomly in CI. I am not able to reproduce the issue locally but this has been reported few times. So I tried to modify code and see if I can fix the random failure. Signed-off-by: selansen <[email protected]> Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 88578aa) Signed-off-by: Sebastiaan van Stijn <[email protected]>
fee45b5 to
e8c38c8
Compare
|
Github links to an old job; this is the current one; https://ci.docker.com/public/blue/organizations/jenkins/engine/detail/PR-401/15/pipeline |
|
OK, so it's failing on: https://ci.docker.com/public/blue/rest/organizations/jenkins/pipelines/engine/branches/PR-401/runs/15/nodes/215/log/?start=0 And I just notice that this is an actual failure because swarmkit was updated with a fix to swarmkit that requires this test-change; moby#39966 Fix in swarmkit is moby/swarmkit#2890, and that got merged as part of #346 We need to apply this patch: + assert.Equal(t, out.IPAM.Config[0].Subnet, "20.20.1.0/24")
+
+ // Also inspect ingress network and make sure its in the same subnet
+ out, err = cli.NetworkInspect(ctx, "ingress", types.NetworkInspectOptions{Verbose: true})
+ assert.NilError(t, err)
+ assert.Assert(t, len(out.IPAM.Config) > 0) |
Signed-off-by: Arko Dasgupta <[email protected]> (cherry picked from commit 084f5ab) Signed-off-by: Sebastiaan van Stijn <[email protected]>
A lack of check in the test code can lead to a panic due to `len(ids)` being `0`. Avoid the panic by adding appropriate checks. Note `Assert()` should be used rather than `Check()` as if it fails we should not proceed with the test. Originally found in moby#38404. Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 7e7ff2a) Signed-off-by: Sebastiaan van Stijn <[email protected]>
It has been declared deprecated by the author, and has a knack for false-positives (as well as giving bad advice when it comes to APIs -- which is quite clear when looking at "nolint: interfacer" comments). Signed-off-by: Aleksa Sarai <[email protected]> (cherry picked from commit d283c7f) Signed-off-by: Sebastiaan van Stijn <[email protected]>
`TestBuildBuildTimeArgEnv` and `TestBuildBuildTimeArgEmptyValVariants` were using non-standard comparisons. Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit dbde478) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 32f1c65) Signed-off-by: Sebastiaan van Stijn <[email protected]>
- Add quotes to prevent word splitting in `cp` statement (SC2046) - Replace legacy back tics with `$()` - Replace `which` with `command -v` (SC2230) - Fix incorrect (`==`) comparison Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 70d3677) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Use `cli.Docker` instead `dockerCmdWithResult`. Signed-off-by: Jintao Zhang <[email protected]> (cherry picked from commit e6fce00) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Trying to see if this helps with the cleanup step exiting in CI, but Jenkins continuing to wait for the script to end afterwards. Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 8e8c52c) Signed-off-by: Sebastiaan van Stijn <[email protected]>
…ins runs this script Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 7eb522a) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Hyper-V isolated containers do not allow file-operations on a running container. This test currently uses `docker cp` to verify that the WORKDIR was automatically created, which cannot be done while the container is running. ``` FAIL: docker_cli_create_test.go:302: DockerSuite.TestCreateWithWorkdir assertion failed: Command: d:\CI-7\CI-f3768a669\binary\docker.exe cp foo:c:\home\foo\bar c:\tmp ExitCode: 1 Error: exit status 1 Stdout: Stderr: Error response from daemon: filesystem operations against a running Hyper-V container are not supported Failures: ExitCode was 1 expected 0 Expected no error ``` Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit ac9ef84) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit b6f596c) Signed-off-by: Sebastiaan van Stijn <[email protected]>
There's already a step in "Nuke Everything", but lets' stop it after stopping the daemon as well Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit e1636ad) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Noticed this test container not exiting correctly while debugging another issue. Before this change, signals were being eaten by bash, now they are hanlded by top. This cuts the test time in half since it doesn't have to wait for docker to SIGKILL it. Old: PASS: docker_cli_swarm_test.go:840: DockerSwarmSuite.TestSwarmServiceTTY 18.997s New: PASS: docker_cli_swarm_test.go:840: DockerSwarmSuite.TestSwarmServiceTTY 6.293s Signed-off-by: Brian Goff <[email protected]> (cherry picked from commit e6c5563) Signed-off-by: Sebastiaan van Stijn <[email protected]>
The daemon was already created and started with the busybox image loaded, so there's no need to load the image again. Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 8fc2358) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Starting the daemon should not load the busybox image again in most cases, so add a new `StartNodeWithBusybox` function to be clear that this one loads the busybox image, and use `StartNode()` for cases where loading the busybox image is not needed. Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit ead3f4e) Signed-off-by: Sebastiaan van Stijn <[email protected]>
This test frequently fails on Windows RS1 (mainly), so skipping it
for now on Windows;
```
ok github.com/docker/docker/daemon/logger 0.525s coverage: 43.0% of statements
time="2019-09-09T20:37:35Z" level=info msg="Trying to get region from EC2 Metadata"
time="2019-09-09T20:37:36Z" level=info msg="Log stream already exists" errorCode=ResourceAlreadyExistsException logGroupName= logStreamName= message= origError="<nil>"
--- FAIL: TestLogBlocking (0.02s)
cloudwatchlogs_test.go:313: Expected to be able to read from stream.messages but was unable to
time="2019-09-09T20:37:36Z" level=error msg=Error
time="2019-09-09T20:37:36Z" level=error msg="Failed to put log events" errorCode=InvalidSequenceTokenException logGroupName=groupName logStreamName=streamName message="use token token" origError="<nil>"
time="2019-09-09T20:37:36Z" level=error msg="Failed to put log events" errorCode=DataAlreadyAcceptedException logGroupName=groupName logStreamName=streamName message="use token token" origError="<nil>"
time="2019-09-09T20:37:36Z" level=info msg="Data already accepted, ignoring error" errorCode=DataAlreadyAcceptedException logGroupName=groupName logStreamName=streamName message="use token token"
FAIL
coverage: 78.2% of statements
FAIL github.com/docker/docker/daemon/logger/awslogs 0.630s
```
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 6c75c86)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
TestLogBlocking is intended to test that the Log method blocks by default. It does this by mocking out the internals of the awslogs.logStream and replacing one of its internal channels with one that is controlled by the test. The call to Log occurs inside a goroutine. Go may or may not schedule the goroutine immediately and the blocking may or may not be observed outside the goroutine immediately due to decisions made by the Go runtime. This change adds a small timeout for test failure so that the Go runtime has the opportunity to run the goroutine before the test fails. Signed-off-by: Samuel Karp <[email protected]> (cherry picked from commit fd94bae) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Found these by doing a `grep -R 'using the force'` on a full test run. There's still a few more which are running against the main test daemon, so it is difficult to find which test they belong to. Signed-off-by: Brian Goff <[email protected]> (cherry picked from commit fcd65eb) Signed-off-by: Sebastiaan van Stijn <[email protected]>
On account of being flaky on both RS1 and RS5. Co-Authored-By: Sebastiaan van Stijn <[email protected]> Signed-off-by: Vikram bir Singh <[email protected]> (cherry picked from commit 7de4e13) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Tibor Vass <[email protected]> (cherry picked from commit 5b7347c) Signed-off-by: Sebastiaan van Stijn <[email protected]>
The 18.09 branch is still using go-check, so patching this to make it work with go-check. Signed-off-by: Sebastiaan van Stijn <[email protected]>
The `-test.timeout=5m` was glued directly after the current `TESTFLAGS`,
causing them to be non-functional;
Before:
make TESTDEBUG=1 TESTDIRS='github.com/docker/docker/pkg/filenotify' TESTFLAGS='-test.run TestPollerEvent' test-unit
+ mkdir -p bundles
+ gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- -tags 'netgo seccomp libdm_no_deferred_remove' -cover -coverprofile=bundles/profile.out -covermode=atomic -test.run TestPollerEvent-test.timeout=5m github.com/docker/docker/pkg/filenotify
testing: warning: no tests to run
ok github.com/docker/docker/pkg/filenotify 0.003s coverage: 0.0% of statements [no tests to run]
DONE 0 tests in 0.298s
After:
make TESTDEBUG=1 TESTDIRS='github.com/docker/docker/pkg/filenotify' TESTFLAGS='-test.run TestPollerEvent' test-unit
+ mkdir -p bundles
+ gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- -tags 'netgo seccomp libdm_no_deferred_remove' -cover -coverprofile=bundles/profile.out -covermode=atomic -test.run TestPollerEvent -test.timeout=5m github.com/docker/docker/pkg/filenotify
ok github.com/docker/docker/pkg/filenotify 0.608s coverage: 44.7% of statements
DONE 1 tests in 0.922s
This was introduced in 42f0a0d
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 0620990)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
e8c38c8 to
c3bc5d2
Compare
|
Added the test-changes from moby#39966 to this PR |
Signed-off-by: Sebastiaan van Stijn <[email protected]>
|
Temporarily disabled the flaky-test check, as it was taking up a lot of time; possibly causing the timeout |
|
Now DockerSwarmSuite.TestSwarmVolumePlugin is hanging; Logs, with stackdump of that test: |
Signed-off-by: Sebastiaan van Stijn <[email protected]>
kolyshkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
andrewhsu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
backports of the following PRs (more details about some conflicts when cherry-picking below):
Dockerfile to use a more current version or CRIU, which may be needed when we update
to newer Go versions. The second PR disables the test that was added, so this is mostly
dead code (for now)
and go-winio, plus container/containerd). these changes were missed, because [18.09] Remove boltdb dependency #60 did a manual
vendor update, therefore not including the local changes
FromClientto test env execution moby/moby#39602 AddFromClientto test env executionicmd.RunCmdinsteadicmd.StartCmdmoby/moby#39853 TestRunInteractiveWithRestartPolicy: useicmd.RunCmdinsteadicmd.StartCmdicmd.RunCmdinsteadicmd.StartCmdmoby/moby#39853 Flaky test: TestRunInteractiveWithRestartPolicySteps followed: