8000 fixup test asserts · coder/coder@c74baef · GitHub
[go: up one dir, main page]

Skip to content

Commit c74baef

Browse files
committed
fixup test asserts
1 parent 0dc98e4 commit c74baef

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

provisioner/terraform/resources_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,24 +608,28 @@ func TestConvertResources(t *testing.T) {
608608
Description: "First parameter from child module",
609609
Mutable: true,
610610
DefaultValue: "abcdef",
611+
FormType: proto.ParameterFormType_INPUT,
611612
}, {
612613
Name: "Second parameter from child module",
613614
Type: "string",
614615
Description: "Second parameter from child module",
615616
Mutable: true,
616617
DefaultValue: "ghijkl",
618+
FormType: proto.ParameterFormType_INPUT,
617619
}, {
618620
Name: "First parameter from module",
619621
Type: "string",
620622
Description: "First parameter from module",
621623
Mutable: true,
622624
DefaultValue: "abcdef",
625+
FormType: proto.ParameterFormType_INPUT,
623626
}, {
624627
Name: "Second parameter from module",
625628
Type: "string",
626629
Description: "Second parameter from module",
627630
Mutable: true,
628631
DefaultValue: "ghijkl",
632+
FormType: proto.ParameterFormType_INPUT,
629633
}, {
630634
Name: "Example",
631635
Type: "string",
@@ -637,35 +641,41 @@ func TestConvertResources(t *testing.T) {
637641
Value: "second",
638642
}},
639643
Required: true,
644+
FormType: proto.ParameterFormType_RADIO,
640645
}, {
641646
Name: "number_example",
642647
Type: "number",
643648
DefaultValue: "4",
644649
ValidationMin: nil,
645650
ValidationMax: nil,
651+
FormType: proto.ParameterFormType_INPUT,
646652
}, {
647653
Name: "number_example_max_zero",
648654
Type: "number",
649655
DefaultValue: "-2",
650656
ValidationMin: terraform.PtrInt32(-3),
651657
ValidationMax: terraform.PtrInt32(0),
658+
FormType: proto.ParameterFormType_INPUT,
652659
}, {
653660
Name: "number_example_min_max",
654661
Type: "number",
655662
DefaultValue: "4",
656663
ValidationMin: terraform.PtrInt32(3),
657664
ValidationMax: terraform.PtrInt32(6),
665+
FormType: proto.ParameterFormType_INPUT,
658666
}, {
659667
Name: "number_example_min_zero",
660668
Type: "number",
661669
DefaultValue: "4",
662670
ValidationMin: terraform.PtrInt32(0),
663671
ValidationMax: terraform.PtrInt32(6),
672+
FormType: proto.ParameterFormType_INPUT,
664673
}, {
665674
Name: "Sample",
666675
Type: "string",
667676
Description: "blah blah",
668677
DefaultValue: "ok",
678+
FormType: proto.Parameter 10000 FormType_INPUT,
669679
}},
670680
},
671681
"rich-parameters-order": {
@@ -688,12 +698,14 @@ func TestConvertResources(t *testing.T) {
688698
Type: "string",
689699
Required: true,
690700
Order: 55,
701+
FormType: proto.ParameterFormType_INPUT,
691702
}, {
692703
Name: "Sample",
693704
Type: "string",
694705
Description: "blah blah",
695706
DefaultValue: "ok",
696707
Order: 99,
708+
FormType: proto.ParameterFormType_INPUT,
697709
}},
698710
},
699711
"rich-parameters-validation": {
@@ -719,36 +731,42 @@ func TestConvertResources(t *testing.T) {
719731
Mutable: true,
720732
ValidationMin: nil,
721733
ValidationMax: nil,
734+
FormType: proto.ParameterFormType_INPUT,
722735
}, {
723736
Name: "number_example_max",
724737
Type: "number",
725738
DefaultValue: "4",
726739
ValidationMin: nil,
727740
ValidationMax: terraform.PtrInt32(6),
741+
FormType: proto.ParameterFormType_INPUT,
728742
}, {
729743
Name: "number_example_max_zero",
730744
Type: "number",
731745
DefaultValue: "-3",
732746
ValidationMin: nil,
733747
ValidationMax: terraform.PtrInt32(0),
748+
FormType: proto.ParameterFormType_INPUT,
734749
}, {
735750
Name: "number_example_min",
736751
Type: "number",
737752
DefaultValue: "4",
738753
ValidationMin: terraform.PtrInt32(3),
739754
ValidationMax: nil,
755+
FormType: proto.ParameterFormType_INPUT,
740756
}, {
741757
Name: "number_example_min_max",
742758
Type: "number",
743759
DefaultValue: "4",
744760
ValidationMin: terraform.PtrInt32(3),
745761
ValidationMax: terraform.PtrInt32(6),
762+
FormType: proto.ParameterFormType_INPUT,
746763
}, {
747764
Name: "number_example_min_zero",
748765
Type: "number",
749766
DefaultValue: "4",
750767
ValidationMin: terraform.PtrInt32(0),
751768
ValidationMax: nil,
769+
FormType: proto.ParameterFormType_INPUT,
752770
}},
753771
},
754772
"external-auth-providers": {
@@ -824,29 +842,34 @@ func TestConvertResources(t *testing.T) {
824842
Description: "First parameter from child module",
825843
Mutable: true,
826844
DefaultValue: "abcdef",
845+
FormType: proto.ParameterFormType_INPUT,
827846
}, {
828847
Name: "Second parameter from child module",
829848
Type: "string",
830849
Description: "Second parameter from child module",
831850
Mutable: true,
832851
DefaultValue: "ghijkl",
852+
FormType: proto.ParameterFormType_INPUT,
833853
}, {
834854
Name: "First parameter from module",
835855
Type: "string",
836856
Description: "First parameter from module",
837857
Mutable: true,
838858
DefaultValue: "abcdef",
859+
FormType: proto.ParameterFormType_INPUT,
839860
}, {
840861
Name: "Second parameter from module",
841862
Type: "string",
842863
Description: "Second parameter from module",
843864
Mutable: true,
844865
DefaultValue: "ghijkl",
866+
FormType: proto.ParameterFormType_INPUT,
845867
}, {
846868
Name: "Sample",
847869
Type: "string",
848870
Description: "blah blah",
849871
DefaultValue: "ok",
872+
FormType: proto.ParameterFormType_INPUT,
850873
}},
851874
Presets: []*proto.Preset{{
852875
Name: "My First Project",

0 commit comments

Comments
 (0)
0