1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

tests: fix other flaky connhelper tests

Follow up to cc68c66c95 (there were more
tests with incorrect syntax).

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
Laura Brehm
2024-07-24 11:52:23 +01:00
parent 482bf8613c
commit 4a7388f0dd

View File

@@ -145,7 +145,7 @@ func (mockStdoutEOF) Close() error {
func TestCloseWhileWriting(t *testing.T) {
ctx := context.TODO()
c, err := New(ctx, "sh", "-c", "while true; sleep 1; done")
c, err := New(ctx, "sh", "-c", "while true; do sleep 1; done")
assert.NilError(t, err)
cmdConn := c.(*commandConn)
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))
@@ -173,7 +173,7 @@ func TestCloseWhileWriting(t *testing.T) {
func TestCloseWhileReading(t *testing.T) {
ctx := context.TODO()
c, err := New(ctx, "sh", "-c", "while true; sleep 1; done")
c, err := New(ctx, "sh", "-c", "while true; do sleep 1; done")
assert.NilError(t, err)
cmdConn := c.(*commandConn)
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))