@@ -22,47 +22,47 @@ import (
2222 "testing"
2323 "testing/quick"
2424
25- fuzz "github.com/google/gofuzz "
25+ "sigs.k8s.io/randfill "
2626)
2727
28- func fuzzInterface (i * interface {}, c fuzz .Continue ) {
28+ func fuzzInterface (i * interface {}, c randfill .Continue ) {
2929 m := map [string ]string {}
30- c .Fuzz (& m )
30+ c .Fill (& m )
3131 * i = & m
3232}
3333
3434func (* Schema ) Generate (rand * rand.Rand , size int ) reflect.Value {
3535 s := Schema {}
36- f := fuzz .New ().RandSource (rand ).MaxDepth (4 )
37- f .Fuzz (& s )
36+ f := randfill .New ().RandSource (rand ).MaxDepth (4 )
37+ f .Fill (& s )
3838 return reflect .ValueOf (& s )
3939}
4040
4141func (* Map ) Generate (rand * rand.Rand , size int ) reflect.Value {
4242 m := Map {}
43- f := fuzz .New ().RandSource (rand ).MaxDepth (4 ).Funcs (fuzzInterface )
44- f .Fuzz (& m )
43+ f := randfill .New ().RandSource (rand ).MaxDepth (4 ).Funcs (fuzzInterface )
44+ f .Fill (& m )
4545 return reflect .ValueOf (& m )
4646}
4747
4848func (TypeDef ) Generate (rand * rand.Rand , size int ) reflect.Value {
4949 td := TypeDef {}
50- f := fuzz .New ().RandSource (rand ).MaxDepth (4 )
51- f .Fuzz (& td )
50+ f := randfill .New ().RandSource (rand ).MaxDepth (4 )
51+ f .Fill (& td )
5252 return reflect .ValueOf (td )
5353}
5454
5555func (Atom ) Generate (rand * rand.Rand , size int ) reflect.Value {
5656 a := Atom {}
57- f := fuzz .New ().RandSource (rand ).MaxDepth (4 )
58- f .Fuzz (& a )
57+ f := randfill .New ().RandSource (rand ).MaxDepth (4 )
58+ f .Fill (& a )
5959 return reflect .ValueOf (a )
6060}
6161
6262func (StructField ) Generate (rand * rand.Rand , size int ) reflect.Value {
6363 a := StructField {}
64- f := fuzz .New ().RandSource (rand ).MaxDepth (4 ).Funcs (fuzzInterface )
65- f .Fuzz (& a )
64+ f := randfill .New ().RandSource (rand ).MaxDepth (4 ).Funcs (fuzzInterface )
65+ f .Fill (& a )
6666 return reflect .ValueOf (a )
6767}
6868
0 commit comments