Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: validation to continue after option matchin #17743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cli/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ func TestUpdateValidateRichParameters(t *testing.T) {
err := inv.Run()
// TODO: improve validation so we catch this problem before it reaches the server
// but for now just validate that the server actually catches invalid monotonicity
assert.ErrorContains(t, err, fmt.Sprintf("parameter value must be equal or greater than previous value: %s", tempVal))
assert.ErrorContains(t, err, "parameter value '1' must be equal or greater than previous value: 2")
}()

matches := []string{
Expand Down
1 change: 0 additions & 1 deletion codersdk/richparameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func validateBuildParameter(richParameter TemplateVersionParameter, buildParamet
if !matched {
return xerrors.Errorf("parameter value must match one of options: %s", parameterValuesAsArray(richParameter.Options))
}
return nil
}

if !validationEnabled(richParameter) {
Expand Down
Loading