mirror of https://github.com/docker/cli.git
tests: fix other flaky `connhelper` tests
Follow up tocc68c66c95
(there were more tests with incorrect syntax). Signed-off-by: Laura Brehm <laurabrehm@hey.com> (cherry picked from commit4a7388f0dd
) Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
parent
8a6f7d849d
commit
7f02bc9704
|
@ -145,7 +145,7 @@ func (mockStdoutEOF) Close() error {
|
||||||
|
|
||||||
func TestCloseWhileWriting(t *testing.T) {
|
func TestCloseWhileWriting(t *testing.T) {
|
||||||
ctx := context.TODO()
|
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)
|
assert.NilError(t, err)
|
||||||
cmdConn := c.(*commandConn)
|
cmdConn := c.(*commandConn)
|
||||||
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))
|
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))
|
||||||
|
@ -173,7 +173,7 @@ func TestCloseWhileWriting(t *testing.T) {
|
||||||
|
|
||||||
func TestCloseWhileReading(t *testing.T) {
|
func TestCloseWhileReading(t *testing.T) {
|
||||||
ctx := context.TODO()
|
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)
|
assert.NilError(t, err)
|
||||||
cmdConn := c.(*commandConn)
|
cmdConn := c.(*commandConn)
|
||||||
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))
|
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))
|
||||||
|
|
Loading…
Reference in New Issue