Files
coder/provisionersdk/proto/converter_test.go
T
Steven Masley 8387dd27ab chore: add form_type parameter argument to db (#17920)
`form_type` is a new parameter field in the terraform provider. Bring
that field into coder/coder.

Validation for `multi-select` has also been added.
2025-05-29 08:55:19 -05:00

27 lines
705 B
Go
Generated

package proto_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/coder/coder/v2/provisionersdk/proto"
"github.com/coder/terraform-provider-coder/v2/provider"
)
// TestProviderFormTypeEnum keeps the provider.ParameterFormTypes() enum in sync with the
// proto.FormType enum. If a new form type is added to the provider, it should also be added
// to the proto file.
func TestProviderFormTypeEnum(t *testing.T) {
t.Parallel()
all := provider.ParameterFormTypes()
for _, p := range all {
t.Run(string(p), func(t *testing.T) {
t.Parallel()
_, err := proto.FormType(p)
require.NoError(t, err, "proto form type should be valid, add it to the proto file")
})
}
}