@@ -19,11 +19,8 @@ package v1alpha6
19
19
import (
20
20
"testing"
21
21
22
- fuzz "github.com/google/gofuzz"
23
22
"github.com/onsi/gomega"
24
- "k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
25
23
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26
- runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
27
24
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
28
25
ctrlconversion "sigs.k8s.io/controller-runtime/pkg/conversion"
29
26
@@ -38,33 +35,16 @@ func TestFuzzyConversion(t *testing.T) {
38
35
delete (obj .GetAnnotations (), utilconversion .DataAnnotation )
39
36
}
40
37
41
- fuzzerFuncs := func (_ runtimeserializer.CodecFactory ) []interface {} {
42
- return []interface {}{
43
- func (v1alpha7Cluster * infrav1.OpenStackCluster , c fuzz.Continue ) {
44
- c .FuzzNoCustom (v1alpha7Cluster )
45
-
46
- v1alpha7Cluster .Spec .APIServerLoadBalancer .Provider = ""
47
- },
48
- func (v1alpha7ClusterTemplate * infrav1.OpenStackClusterTemplate , c fuzz.Continue ) {
49
- c .FuzzNoCustom (v1alpha7ClusterTemplate )
50
-
51
- v1alpha7ClusterTemplate .Spec .Template .Spec .APIServerLoadBalancer .Provider = ""
52
- },
53
- }
54
- }
55
-
56
38
t .Run ("for OpenStackCluster" , utilconversion .FuzzTestFunc (utilconversion.FuzzTestFuncInput {
57
39
Hub : & infrav1.OpenStackCluster {},
58
40
Spoke : & OpenStackCluster {},
59
41
HubAfterMutation : ignoreDataAnnotation ,
60
- FuzzerFuncs : []fuzzer.FuzzerFuncs {fuzzerFuncs },
61
42
}))
62
43
63
44
t .Run ("for OpenStackClusterTemplate" , utilconversion .FuzzTestFunc (utilconversion.FuzzTestFuncInput {
64
45
Hub : & infrav1.OpenStackClusterTemplate {},
65
46
Spoke : & OpenStackClusterTemplate {},
66
47
HubAfterMutation : ignoreDataAnnotation ,
67
- FuzzerFuncs : []fuzzer.FuzzerFuncs {fuzzerFuncs },
68
48
}))
69
49
70
50
t .Run ("for OpenStackMachine" , utilconversion .FuzzTestFunc (utilconversion.FuzzTestFuncInput {
0 commit comments