@@ -22,47 +22,47 @@ import (
22
22
"testing"
23
23
"testing/quick"
24
24
25
- fuzz "github.com/google/gofuzz "
25
+ "sigs.k8s.io/randfill "
26
26
)
27
27
28
- func fuzzInterface (i * interface {}, c fuzz .Continue ) {
28
+ func fuzzInterface (i * interface {}, c randfill .Continue ) {
29
29
m := map [string ]string {}
30
- c .Fuzz (& m )
30
+ c .Fill (& m )
31
31
* i = & m
32
32
}
33
33
34
34
func (* Schema ) Generate (rand * rand.Rand , size int ) reflect.Value {
35
35
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 )
38
38
return reflect .ValueOf (& s )
39
39
}
40
40
41
41
func (* Map ) Generate (rand * rand.Rand , size int ) reflect.Value {
42
42
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 )
45
45
return reflect .ValueOf (& m )
46
46
}
47
47
48
48
func (TypeDef ) Generate (rand * rand.Rand , size int ) reflect.Value {
49
49
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 )
52
52
return reflect .ValueOf (td )
53
53
}
54
54
55
55
func (Atom ) Generate (rand * rand.Rand , size int ) reflect.Value {
56
56
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 )
59
59
return reflect .ValueOf (a )
60
60
}
61
61
62
62
func (StructField ) Generate (rand * rand.Rand , size int ) reflect.Value {
63
63
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 )
66
66
return reflect .ValueOf (a )
67
67
}
68
68
0 commit comments