From 7f02bc9704375332705f5fd2a128dc0eadeb6b47 Mon Sep 17 00:00:00 2001 From: Laura Brehm Date: Wed, 24 Jul 2024 11:52:23 +0100 Subject: [PATCH] tests: fix other flaky `connhelper` tests Follow up to cc68c66c9524b37609f3cf48afff52c1853200fe (there were more tests with incorrect syntax). Signed-off-by: Laura Brehm (cherry picked from commit 4a7388f0dd6e5e6006907eea536bd04765fbc1d9) Signed-off-by: Laura Brehm --- cli/connhelper/commandconn/commandconn_unix_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/connhelper/commandconn/commandconn_unix_test.go b/cli/connhelper/commandconn/commandconn_unix_test.go index 40f5afecf5..6c1219f438 100644 --- a/cli/connhelper/commandconn/commandconn_unix_test.go +++ b/cli/connhelper/commandconn/commandconn_unix_test.go @@ -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))