From d86b4225cb70c987da266d503eba8b6afad398b9 Mon Sep 17 00:00:00 2001 From: Dery Rahman Ahaddienata Date: Wed, 1 Nov 2023 15:17:26 +0700 Subject: [PATCH] fix: test --- client/cmd/job/run_input_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/cmd/job/run_input_test.go b/client/cmd/job/run_input_test.go index 97580b1c3b..1e4e0e7636 100644 --- a/client/cmd/job/run_input_test.go +++ b/client/cmd/job/run_input_test.go @@ -16,9 +16,8 @@ func TestConstructConfigEnvSourcingContent(t *testing.T) { } content, keys := job.ConstructConfigEnvSourcingContent(config) assert.Len(t, keys, 1) - assert.Equal(t, `EXAMPLE='' -ANOTHER='hello' -`, content) + assert.Contains(t, content, `EXAMPLE=''`) + assert.Contains(t, content, `ANOTHER='hello'`) }) t.Run("construct content with single quote in it", func(t *testing.T) { config := map[string]string{ @@ -27,8 +26,7 @@ ANOTHER='hello' } content, keys := job.ConstructConfigEnvSourcingContent(config) assert.Len(t, keys, 0) - assert.Equal(t, `EXAMPLE='value with '\''single quote'\''' -ANOTHER='hello' -`, content) + assert.Contains(t, content, `EXAMPLE='value with '\''single quote'\'''`) + assert.Contains(t, content, `ANOTHER='hello'`) }) }