integration-cli: make TestServiceLogs less noisy

Before:

    make TEST_FILTER=TestServiceLogs test-integration
    ...
    --- PASS: TestDockerSwarmSuite/TestServiceLogs (14.63s)
             docker_cli_service_logs_test.go:49: log for "TestServiceLogs1": "TestServiceLogs1.1.rjyqj1v08llu@625d614f901a    | hello1\n"
             docker_cli_service_logs_test.go:49: log for "TestServiceLogs2": "TestServiceLogs2.1.fyaljkh9tmp3@625d614f901a    | hello2\n"

After:

    make TEST_FILTER=TestServiceLogs test-integration
    ...
    --- PASS: TestDockerSwarmSuite/TestServiceLogs (14.63s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-10-21 15:49:55 +02:00
parent bebd820628
commit 69c4a4f4a2
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -46,8 +46,7 @@ func (s *DockerSwarmSuite) TestServiceLogs(c *testing.T) {
for name, message := range services {
out, err := d.Cmd("service", "logs", name)
assert.NilError(c, err)
c.Logf("log for %q: %q", name, out)
assert.Assert(c, strings.Contains(out, message))
assert.Assert(c, strings.Contains(out, message), "log for %q: %q", name, out)
}
}