File tree Expand file tree Collapse file tree
pkg/apis/certificates/fuzzer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ go_library(
1111 importpath = "k8s.io/kubernetes/pkg/apis/certificates/fuzzer" ,
1212 deps = [
1313 "//pkg/apis/certificates:go_default_library" ,
14+ "//pkg/apis/core:go_default_library" ,
1415 "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library" ,
1516 "//vendor/github.com/google/gofuzz:go_default_library" ,
1617 ],
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
2121
2222 runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
2323 "k8s.io/kubernetes/pkg/apis/certificates"
24+ api "k8s.io/kubernetes/pkg/apis/core"
2425)
2526
2627// Funcs returns the fuzzer functions for the certificates api group.
@@ -31,5 +32,11 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
3132 obj .Usages = []certificates.KeyUsage {certificates .UsageKeyEncipherment }
3233 obj .SignerName = "example.com/custom-sample-signer"
3334 },
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+ },
3441 }
3542}
You can’t perform that action at this time.
0 commit comments