Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmichalak committed Jul 5, 2024
1 parent 248a015 commit 03e2ddc
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions pkg/sdk/parsers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,22 @@ func TestParseCommaSeparatedStringArray(t *testing.T) {
Result: []string{"one"},
},
{
Name: "multiple elements in list",
Name: "one element in list with quotes",
Value: "['one']",
TrimQuotes: true,
Result: []string{"one"},
},
{
Name: "multiple elements with quotes in list",
Value: "[one, two, three]",
Result: []string{"one", "two", "three"},
},
{
Name: "multiple elements with quotes in list",
Value: "['one', 'two', 'three']",
TrimQuotes: true,
Result: []string{"one", "two", "three"},
},
{
Name: "multiple elements in list - packed",
Value: "[one,two,three]",
Expand All @@ -46,7 +58,13 @@ func TestParseCommaSeparatedStringArray(t *testing.T) {
{
Name: "list without brackets",
Value: "one,two,three",
Result: []string{},
Result: []string{"one", "two", "three"},
},
{
Name: "list without brackets, elems with quotes",
Value: "'one','two','three'",
TrimQuotes: true,
Result: []string{"one", "two", "three"},
},
}

Expand Down

0 comments on commit 03e2ddc

Please sign in to comment.