Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
deryrahman committed Nov 1, 2023
1 parent b13a653 commit d86b422
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions client/cmd/job/run_input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ func TestConstructConfigEnvSourcingContent(t *testing.T) {
}
content, keys := job.ConstructConfigEnvSourcingContent(config)
assert.Len(t, keys, 1)
assert.Equal(t, `EXAMPLE='<no value>'
ANOTHER='hello'
`, content)
assert.Contains(t, content, `EXAMPLE='<no value>'`)
assert.Contains(t, content, `ANOTHER='hello'`)
})
t.Run("construct content with single quote in it", func(t *testing.T) {
config := map[string]string{
Expand All @@ -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'`)
})
}

0 comments on commit d86b422

Please sign in to comment.