File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
pkg/apis/certificates/fuzzer Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ go_library(
11
11
importpath = "k8s.io/kubernetes/pkg/apis/certificates/fuzzer" ,
12
12
deps = [
13
13
"//pkg/apis/certificates:go_default_library" ,
14
+ "//pkg/apis/core:go_default_library" ,
14
15
"//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library" ,
15
16
"//vendor/github.com/google/gofuzz:go_default_library" ,
16
17
],
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
21
21
22
22
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
23
23
"k8s.io/kubernetes/pkg/apis/certificates"
24
+ api "k8s.io/kubernetes/pkg/apis/core"
24
25
)
25
26
26
27
// Funcs returns the fuzzer functions for the certificates api group.
@@ -31,5 +32,11 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
31
32
obj .Usages = []certificates.KeyUsage {certificates .UsageKeyEncipherment }
32
33
obj .SignerName = "example.com/custom-sample-signer"
33
34
},
35
+ func (obj * certificates.CertificateSigningRequestCondition , c fuzz.Continue ) {
36
+ c .FuzzNoCustom (obj ) // fuzz self without calling this function again
37
+ if len (obj .Status ) == 0 {
38
+ obj .Status = api .ConditionTrue
39
+ }
40
+ },
34
41
}
35
42
}
You can’t perform that action at this time.
0 commit comments