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 3434
3535 - uses : actions/setup-go@v2
3636 with :
37- go-version : ' 1.17 '
37+ go-version : ' 1.18 '
3838
3939 - name : test ./...
4040 run : go test --tags=examples ./...
Original file line number Diff line number Diff line change @@ -64,6 +64,18 @@ func TestBadConfigs(t *testing.T) {
6464 }
6565}
6666
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+
6779func TestInvalidConfig (t * testing.T ) {
6880 err := Validate (& Config {
6981 SQL : []SQL {{
@@ -163,3 +175,19 @@ func TestTypeOverrides(t *testing.T) {
163175 })
164176 }
165177}
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