Skip to content

Commit

Permalink
Add internal function to parse multienv step input
Browse files Browse the repository at this point in the history
This new function properly deals with quotes and commas in values.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
  • Loading branch information
inkel committed Jun 22, 2023
1 parent 1b907e9 commit 8a86a78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/core/runtime/multienv_step_runner_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func TestMultiEnvStepRunner_Run_parser(t *testing.T) {
`FOO="bar",QUUX='baz'`: {"FOO", "bar", "QUUX", "baz"},
`FOO='bar',QUUX="baz"`: {"FOO", "bar", "QUUX", "baz"},

"FOO=\"bar\nbaz\"": {"FOO", "bar\nbaz"},

`KEY="foo='bar',lorem=ipsum"`: {"KEY", "foo='bar',lorem=ipsum"},
`FOO=bar,QUUX="lorem ipsum"`: {"FOO", "bar", "QUUX", "lorem ipsum"},

Expand Down

0 comments on commit 8a86a78

Please sign in to comment.