File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 34
34
35
35
- uses : actions/setup-go@v2
36
36
with :
37
- go-version : ' 1.17 '
37
+ go-version : ' 1.18 '
38
38
39
39
- name : test ./...
40
40
run : go test --tags=examples ./...
Original file line number Diff line number Diff line change @@ -64,6 +64,18 @@ func TestBadConfigs(t *testing.T) {
64
64
}
65
65
}
66
66
67
+ const validConfigOne = `{
68
+ "version": "1"
69
+ "packages": []
70
+ }`
71
+
72
+ func FuzzConfig (f * testing.F ) {
73
+ f .Add (validConfigOne )
74
+ f .Fuzz (func (t * testing.T , orig string ) {
75
+ ParseConfig (strings .NewReader (orig ))
76
+ })
77
+ }
78
+
67
79
func TestInvalidConfig (t * testing.T ) {
68
80
err := Validate (& Config {
69
81
SQL : []SQL {{
@@ -163,3 +175,19 @@ func TestTypeOverrides(t *testing.T) {
163
175
})
164
176
}
165
177
}
178
+
179
+ func FuzzOverride (f * testing.F ) {
180
+ for _ , spec := range []string {
181
+ "string" ,
182
+ "github.com/gofrs/uuid.UUID" ,
183
+ "github.com/segmentio/ksuid.KSUID" ,
184
+ } {
185
+ f .Add (spec )
186
+ }
187
+ f .Fuzz (func (t * testing.T , s string ) {
188
+ o := Override {
189
+ GoType : GoType {Spec : s },
190
+ }
191
+ o .Parse ()
192
+ })
193
+ }
You can’t perform that action at this time.
0 commit comments