Browse code

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>

Sebastiaan van Stijn authored on 2019/09/11 23:24:53
Showing 1 changed files
... ...
@@ -51,24 +51,24 @@ func (s *DockerSuite) TestAttachMultipleAndRestart(c *testing.T) {
51 51
 
52 52
 			out, err := cmd.StdoutPipe()
53 53
 			if err != nil {
54
-				c.Fatal(err)
54
+				c.Error(err)
55 55
 			}
56 56
 			defer out.Close()
57 57
 
58 58
 			if err := cmd.Start(); err != nil {
59
-				c.Fatal(err)
59
+				c.Error(err)
60 60
 			}
61 61
 
62 62
 			buf := make([]byte, 1024)
63 63
 
64 64
 			if _, err := out.Read(buf); err != nil && err != io.EOF {
65
-				c.Fatal(err)
65
+				c.Error(err)
66 66
 			}
67 67
 
68 68
 			startGroup.Done()
69 69
 
70 70
 			if !strings.Contains(string(buf), "hello") {
71
-				c.Fatalf("unexpected output %s expected hello\n", string(buf))
71
+				c.Errorf("unexpected output %s expected hello\n", string(buf))
72 72
 			}
73 73
 		}()
74 74
 	}