Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion coderd/workspacebuilds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ func TestWorkspaceBuildValidateRichParameters(t *testing.T) {
{numberParameterName, "10", true, numberRichParameters},
{numberParameterName, "11", false, numberRichParameters},

{stringParameterName, "", false, stringRichParameters},
{stringParameterName, "", true, stringRichParameters},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that what happens here is that the parameter is ignored by API as it's "", hence it doesn't fail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I see.

{stringParameterName, "foobar", true, stringRichParameters},

{stringParameterName, "abcd", true, regexRichParameters},
Expand All @@ -912,6 +912,7 @@ func TestWorkspaceBuildValidateRichParameters(t *testing.T) {
}

for _, tc := range tests {
tc := tc
t.Run(tc.parameterName+"-"+tc.value, func(t *testing.T) {
t.Parallel()

Expand Down