1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

integration-cli: TestAttachMultipleAndRestart: don't call t.Fatal from a goroutine

```
integration-cli/docker_cli_attach_test.go:44:: SA2002: the goroutine calls T.Fatal, which must be called in the same goroutine as the test (staticcheck)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-09-11 16:24:53 +02:00
parent a2f16b0ad3
commit cbc3cfe101
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -51,24 +51,24 @@ func (s *DockerSuite) TestAttachMultipleAndRestart(c *testing.T) {
out, err := cmd.StdoutPipe()
if err != nil {
c.Fatal(err)
c.Error(err)
}
defer out.Close()
if err := cmd.Start(); err != nil {
c.Fatal(err)
c.Error(err)
}
buf := make([]byte, 1024)
if _, err := out.Read(buf); err != nil && err != io.EOF {
c.Fatal(err)
c.Error(err)
}
startGroup.Done()
if !strings.Contains(string(buf), "hello") {
c.Fatalf("unexpected output %s expected hello\n", string(buf))
c.Errorf("unexpected output %s expected hello\n", string(buf))
}
}()
}