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
1 changed files with 4 additions and 4 deletions

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))
}
}()
}