mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: do not skip parameter validation if min or max = 0 (#7707)
This commit is contained in:
+2
-1
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/coder/coder/cli/clitest"
|
||||
"github.com/coder/coder/coderd/coderdtest"
|
||||
"github.com/coder/coder/coderd/gitauth"
|
||||
"github.com/coder/coder/coderd/util/ptr"
|
||||
"github.com/coder/coder/codersdk"
|
||||
"github.com/coder/coder/provisioner/echo"
|
||||
"github.com/coder/coder/provisionersdk/proto"
|
||||
@@ -494,7 +495,7 @@ func TestCreateValidateRichParameters(t *testing.T) {
|
||||
)
|
||||
|
||||
numberRichParameters := []*proto.RichParameter{
|
||||
{Name: numberParameterName, Type: "number", Mutable: true, ValidationMin: 3, ValidationMax: 10},
|
||||
{Name: numberParameterName, Type: "number", Mutable: true, ValidationMin: ptr.Ref(int32(3)), ValidationMax: ptr.Ref(int32(10))},
|
||||
}
|
||||
|
||||
stringRichParameters := []*proto.RichParameter{
|
||||
|
||||
Reference in New Issue
Block a user