From 1fd6e40e82a3fbba0d44d99cbb7ae4e02ed22588 Mon Sep 17 00:00:00 2001 From: Son Bui Date: Tue, 15 Aug 2023 17:36:18 +0800 Subject: [PATCH] fix: fail test on pr #11368 (#11576) --- cmd/argoexec/commands/emissary_test.go | 2 +- workflow/executor/os-specific/command_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/argoexec/commands/emissary_test.go b/cmd/argoexec/commands/emissary_test.go index 78cc0be041cc..3b5e199b77f2 100644 --- a/cmd/argoexec/commands/emissary_test.go +++ b/cmd/argoexec/commands/emissary_test.go @@ -49,7 +49,7 @@ func TestEmissary(t *testing.T) { }) t.Run("Sub-process", func(t *testing.T) { _ = os.Remove(varRunArgo + "/ctr/main/stdout") - err := run("(sleep 60; echo 'should not wait for sub-process')& echo -n hello") + err := run(`(sleep 60; echo 'should not wait for sub-process')& echo "hello\c"`) assert.NoError(t, err) data, err := os.ReadFile(varRunArgo + "/ctr/main/stdout") assert.NoError(t, err) diff --git a/workflow/executor/os-specific/command_test.go b/workflow/executor/os-specific/command_test.go index 53b07d5da96f..f247ac047f0f 100644 --- a/workflow/executor/os-specific/command_test.go +++ b/workflow/executor/os-specific/command_test.go @@ -11,7 +11,7 @@ import ( ) func TestSimpleStartCloser(t *testing.T) { - cmd := exec.Command("sh", "-c", "echo -n A123456789B123456789C123456789D123456789E123456789") + cmd := exec.Command("sh", "-c", `echo "A123456789B123456789C123456789D123456789E123456789\c"`) var stdoutWriter bytes.Buffer slowWriter := SlowWriter{ &stdoutWriter,