Tryout go test fuzzing
This commit is contained in:
@@ -21,3 +21,18 @@ func TestBBoltStore(t *testing.T) {
|
||||
}
|
||||
testLoginAttemptStore(s, t)
|
||||
}
|
||||
|
||||
func FuzzBBoltStore(f *testing.F) {
|
||||
dir := f.TempDir()
|
||||
file, err := os.CreateTemp(dir, "apiary-test-bbolt")
|
||||
if err != nil {
|
||||
f.Fatal(err)
|
||||
}
|
||||
fname := file.Name()
|
||||
file.Close()
|
||||
s, err := store.NewBBoltStore(fname)
|
||||
if err != nil {
|
||||
f.Fatal(err)
|
||||
}
|
||||
fuzzLoginAttemptStore(s, f)
|
||||
}
|
||||
|
Reference in New Issue
Block a user