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 26, 2023
1 parent 41cde2a commit afdadb7
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 afdadb7

Please sign in to comment.