Add defaults for HTTGetAction.Path & test actions

The comment says optional - this makes it optional.  Test handler actions.
This commit is contained in:
Tim Hockin
2015-02-27 17:33:58 -08:00
parent 0fec31a11e
commit 532c39c336
6 changed files with 71 additions and 0 deletions

View File

@@ -240,6 +240,11 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
ep.IP = fmt.Sprintf("%d.%d.%d.%d", c.Rand.Intn(256), c.Rand.Intn(256), c.Rand.Intn(256), c.Rand.Intn(256))
ep.Port = c.Rand.Intn(65536)
},
func(http *api.HTTPGetAction, c fuzz.Continue) {
http.Path = "/" + c.RandString() // can't be blank
c.Fuzz(&http.Port)
c.Fuzz(&http.Host)
},
)
return f
}