testutil: no more "Creating a new daemon at"

Instead of logging on the "happy path", add more details when
we fail to create a daemon. Now that we base the path of the
daemon on the test-name, it should still be easy to find.

Before:

    make TEST_FILTER=TestSwarmNetworkCreateIssue27866 test-integration
    ...
    === RUN   TestDockerSwarmSuite
    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateIssue27866
    --- PASS: TestDockerSwarmSuite (7.47s)
        --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateIssue27866 (7.47s)
            docker_cli_swarm_test.go:1499: Creating a new daemon at: "/go/src/github.com/docker/docker/bundles/test-integration/TestDockerSwarmSuite/TestSwarmNetworkCreateIssue27866"

After:

    make TEST_FILTER=TestSwarmNetworkCreateIssue27866 test-integration
    ...
    === RUN   TestDockerSwarmSuite
    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateIssue27866
    --- PASS: TestDockerSwarmSuite (8.67s)
        --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateIssue27866 (8.67s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-21 12:41:39 +02:00
parent 060e55d7dd
commit 56230f4d37
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 2 deletions

View File

@ -148,9 +148,8 @@ func New(t testing.TB, ops ...Option) *Daemon {
assert.Check(t, dest != "", "Please set the DOCKER_INTEGRATION_DAEMON_DEST or the DEST environment variable")
t.Logf("Creating a new daemon at: %q", dest)
d, err := NewDaemon(dest, ops...)
assert.NilError(t, err, "could not create daemon")
assert.NilError(t, err, "could not create daemon at %q", dest)
return d
}