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:
parent
a2f16b0ad3
commit
cbc3cfe101
1 changed files with 4 additions and 4 deletions
|
@ -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))
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue