Skip to content

Remove go-check#39799

Merged
thaJeztah merged 52 commits intomoby:masterfrom
tiborvass:bye-bye-gocheck
Sep 10, 2019
Merged

Remove go-check#39799
thaJeztah merged 52 commits intomoby:masterfrom
tiborvass:bye-bye-gocheck

Conversation

@tiborvass
Copy link
Contributor

This will get rid of the ancient go-check framework and replaces it with gotest.tools because:

  1. it integrates better with testing.T
  2. we already use it elsewhere

I know there are many commits but I tried to make each commit easily reviewable on purpose, some of them are automated.

The commits prefixed with rm-gocheck: have been made by a script that's in the commit message.

The main structure of this PR is as follows:

  • do as much as possible before (e.g. fixing incorrect tests, prepare code for script)
  • replace with sed and eg
  • fix leftovers
  • hook up new test framework
  • some cleanup

TODO:

  • timeout currently hangs, needs to be fixed (testing with TESTFLAGS='-timeout 5s -test.run /DockerDaemonSuite/TestDaemonKillLiveRestoreWithPlugins)
  • gotestsum (maybe followup)

cc @thaJeztah @andrewhsu @cpuguy83

@thaJeztah
Copy link
Member

/cc @vdemeester

@cpuguy83
Copy link
Member

cpuguy83 commented Aug 26, 2019 via email

@thaJeztah
Copy link
Member

We can now probably also remove the testingT interface, and the namer and testNamer interfaces I added in #39506

type namer interface {
Name() string
}
type testNamer interface {
TestName() string
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that i removed the global timeout in favor of per-test timeout (which doesn't work for now).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should probably explain why I removed this test in its own commit message: this test used to test an API regression which could possibly be a unit test. However today it will always silently succeed because PublicPort and IP are not even nullable types (not a pointer), and yet checker.NotNil succeeds silently instead of panicking.

Basically what happened is that this test got refactored to start using the API types and API client library instead of custom types and stdlib's http functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it in the commit message

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my other comments; looking at this again, I guess these were using checker.NotNil because the value itself was not important (but must be set), so perhaps we can change these to value != "" (e.g.)

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a first pass, and left some comments inline; also wondering if we can change c *testing.T to t *testing.T everywhere (there might be some where t is in use in the test, but we could fix those up)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like "actual" and "expected" are flipped here

Copy link
Contributor Author

@tiborvass tiborvass Aug 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equality is symmetric

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equality is symmetric

True, but this func is documented as

func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool

and the error message it generates might use the "expected" and "actual" terms, so it makes sense to have them in the correct order.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fmt.Sprintf(..) is not needed, assert.Equal() already takes a format-string;

func Equal(t TestingT, x, y interface{}, msgAndArgs ...interface{}) {

func TestFoo(t *testing.T) {
	assert.Equal(t, "one", "two", "bla %s bla", "bla")
}
=== RUN   TestFoo
--- FAIL: TestFoo (0.00s)
    debug_test.go:48: assertion failed: one (string) != two (string): bla bla bla
FAIL

Process finished with exit code 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but my script is no AI yet ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could probably remove all check.Commentf(...), but we can do in a follow-up

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a follow-up; wondering if we should just use == for comparison instead of assert.Equal, which would me more consistent with != below (and take any weird comparison bugs in the assertion library)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use assert.Equal over being consistent, because in the failure case the logging is cleaner. It's just unfortunate that the assert library does not have a generic Not assertion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, a NotEqual comparison should not be terribly hard, except the comparison implementation details (like output formatting) are not exported.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you both moved this one (_unix_test -> _test) and removed the !windows build-tag ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so that DockerExternalVolumeSuite is reachable when GOOS=windows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we replace this with a !windows buildtag, or a check if daemon != client platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is value in seeing all the suites in one place. We could maybe have the SetUp hook skip the test based on runtime.GOOS instead of conditionals in Test()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert.NilError(c, err, ...) (we can probably reach if there's others like this)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, just not super important, as long as it works as intended i'm fine. The goal is to remove gocheck while keeping the tests correct.

@tiborvass tiborvass force-pushed the bye-bye-gocheck branch 2 times, most recently from b664aae to 706cd7f Compare August 26, 2019 22:32
@tiborvass
Copy link
Contributor Author

@thaJeztah

also wondering if we can change c *testing.T to t *testing.T everywhere (there might be some where t is in use in the test, but we could fix those up)

Sure, I just thought it would be more prudent to keep it this way. Also you might be just as surprised as I was when I saw that the stdlib also uses c: https://godoc.org/testing#T.Error

@thaJeztah
Copy link
Member

Sure, I just thought it would be more prudent to keep it this way. Also you might be just as surprised as I was when I saw that the stdlib also uses c: https://godoc.org/testing#T.Error

Hm.. yes, that's surprising. They seem to not be consistent there (other cases on the same page use t)

@thaJeztah
Copy link
Member

Looks like there's some leftover -check.v options in the powershell script


[2019-08-26T23:19:24.407Z] INFO: make.ps1 ended at 08/26/2019 23:19:24
[2019-08-26T23:19:24.407Z] INFO: Integration CLI tests being run from the host:
[2019-08-26T23:19:24.407Z] INFO: go test "-check.v" "-tags" "autogen" "-check.timeout" "10m" "-test.timeout" "200m" 
[2019-08-26T23:19:34.742Z] INFO: Windows Base image is  mcr.microsoft.com/windows/servercore:ltsc2016
[2019-08-26T23:19:34.742Z] flag provided but not defined: -check.v
[2019-08-26T23:19:34.742Z] Usage of C:\windows\TEMP\go-build839755590\b001\integration-cli.test.exe:

And in the e2e-run.sh;

flags="-check.v -check.timeout=${TIMEOUT:-200m} -test.timeout=360m $TESTFLAGS"

@thaJeztah
Copy link
Member

thaJeztah commented Aug 26, 2019

found some more -check.v, -check.f, and -check.timeout, so you might have to do a quick search for -check.

@tiborvass
Copy link
Contributor Author

@thaJeztah thanks, will do

@tiborvass tiborvass force-pushed the bye-bye-gocheck branch 2 times, most recently from ded3390 to faf3b22 Compare August 27, 2019 01:18
@thaJeztah
Copy link
Member

oh, whoops; needs a rebase 😓 - should not be too difficult though

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, missed that you rebased; looks like build is failing (left comments inline)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build is failing here; https://ci.docker.com/public/job/moby/job/PR-39799/7/execution/node/156/log/

23:20:11  internal/test/suite/suite.go:1::warning: file is not goimported (goimports)
23:20:11  internal/test/suite/suite.go:7:2:warning: "fmt" imported but not used (unconvert)
23:20:11  internal/test/suite/suite.go:12:2:warning: "time" imported but not used (gosimple)

@thaJeztah
Copy link
Member

One failure; https://ci.docker.com/public/blue/rest/organizations/jenkins/pipelines/moby/branches/PR-39799/runs/8/nodes/34/log/?start=0

[2019-09-03T18:23:29.051Z]     --- FAIL: Test/DockerSuite/TestExecStateCleanup (11.10s)
[2019-09-03T18:23:29.051Z]         docker_utils_test.go:422: assertion failed: 4 (v int) != 2 (int)

This looks a bit weird; looks like it sees Test/ as the actual test, and everything "after" Test/ as sub-tests;

[2019-09-03T18:23:29.048Z] --- FAIL: Test (1973.35s)
[2019-09-03T18:23:29.048Z]     --- PASS: Test/DockerSuite/TestAPIClientVersionOldNotSupported (0.00s)
[2019-09-03T18:23:29.048Z]     --- PASS: Test/DockerSuite/TestAPICreateDeletePredefinedNetworks (0.05s)
[2019-09-03T18:23:29.048Z]     --- PASS: Test/DockerSuite/TestAPIErrorJSON (0.02s)
[2019-09-03T18:23:29.048Z]     --- PASS: Test/DockerSuite/TestAPIErrorNotFoundJSON (0.01s)

... many tests in between .. and then the actual failure

[2019-09-03T18:23:29.051Z]     --- FAIL: Test/DockerSuite/TestExecStateCleanup (11.10s)
[2019-09-03T18:23:29.051Z]         docker_utils_test.go:422: assertion failed: 4 (v int) != 2 (int)

Looks like we may need some throttling on these;

Details
[2019-09-03T18:34:19.178Z]     --- FAIL: Test/DockerSwarmSuite/TestSwarmVolumePlugin (52.35s)
[2019-09-03T18:34:19.178Z]         daemon.go:36: Creating a new daemon at: /go/src/github.com/docker/docker/bundles/test-integration/3/Test/DockerSwarmSuite/TestSwarmVolumePlugin
[2019-09-03T18:34:19.178Z]         daemon.go:336: [d95b1a41320cd] waiting for daemon to start
[2019-09-03T18:34:19.178Z]         daemon.go:336: [d95b1a41320cd] waiting for daemon to start
[2019-09-03T18:34:19.178Z]         daemon.go:364: [d95b1a41320cd] daemon started
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.178Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         docker_utils_test.go:422: assertion failed: 0 (v int) != 1 (int)
[2019-09-03T18:34:19.179Z]         daemon.go:472: [d95b1a41320cd] Stopping daemon
[2019-09-03T18:34:19.179Z]         daemon.go:307: [d95b1a41320cd] exiting daemon
[2019-09-03T18:34:19.179Z]         daemon.go:459: [d95b1a41320cd] Daemon stopped

Tibor Vass added 4 commits September 9, 2019 21:09
- remove -check.* flags
- use (per-test) -timeout flag
- allow user to override TEST_SKIP_* regardless of TESTFLAGS
- remove test-imports validation

Signed-off-by: Tibor Vass <[email protected]>
@cpuguy83
Copy link
Member

cpuguy83 commented Sep 9, 2019 via email

Tibor Vass added 2 commits September 9, 2019 21:47
Tibor Vass added 2 commits September 10, 2019 00:25
@tiborvass
Copy link
Contributor Author

@cpuguy83 it's green!

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpuguy83 cpuguy83 requested a review from thaJeztah September 10, 2019 17:56
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

left some thoughts about some asserts/tests we removed, but for a follow-up

c.Assert(nr.EnableIPv6, checker.Equals, false)
c.Assert(nr.IPAM.Driver, checker.Equals, "default")
c.Assert(len(nr.IPAM.Config), checker.Equals, 1)
c.Assert(nr.IPAM.Config[0].Subnet, checker.NotNil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should create a tracking issue; I can imagine this was meant to check for a non-empty value, so could be changed to, e.g. nr.IPAM.Config[0].Subnet != ""

c.Assert(nr.IPAM.Driver, checker.Equals, "default")
c.Assert(len(nr.IPAM.Config), checker.Equals, 1)
c.Assert(nr.IPAM.Config[0].Subnet, checker.NotNil)
c.Assert(nr.IPAM.Config[0].Gateway, checker.NotNil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for these

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my other comments; looking at this again, I guess these were using checker.NotNil because the value itself was not important (but must be set), so perhaps we can change these to value != "" (e.g.)

@thaJeztah
Copy link
Member

thaJeztah commented Sep 10, 2019

Only failure is a flaky test on Windows RS1;

https://ci.docker.com/public/blue/rest/organizations/jenkins/pipelines/moby/branches/PR-39799/runs/17/nodes/50/log/?start=0

[2019-09-10T02:02:55.547Z] --- FAIL: Test (4308.45s)
...

[2019-09-10T02:02:55.553Z]     --- FAIL: Test/DockerSuite/TestStartReturnCorrectExitCode (10.26s)
[2019-09-10T02:02:55.553Z]         docker_cli_start_test.go:198: assertion failed: 125 (exitCode int) != 12 (int): out: time="2019-09-10T02:01:34Z" level=error msg="error waiting for container: EOF" 
[2019-09-10T02:02:55.553Z]             
[2019-09-10T02:02:55.553Z]         check_test.go:123: assertion failed: error is not nil: Error response from daemon: container d7ee296a431a610e0accc9d57e47ea01117079b824c74b164b2cf2b1c3dd10a0: driver "windowsfilter" failed to remove root filesystem: hcsshim::GetComputeSystems: Access is denied.: failed to remove d7ee296a431a610e0accc9d57e47ea01117079b824c74b164b2cf2b1c3dd10a0

@thaJeztah thaJeztah merged commit 1fd0107 into moby:master Sep 10, 2019
@cpuguy83
Copy link
Member

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants