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'`) }) }