Skip to content

Commit

Permalink
Merge pull request kubernetes#119543 from jpbetz/fix-xvalidations-flake
Browse files Browse the repository at this point in the history
Treat empty string as nil in fuzzer for CEL Reason field
  • Loading branch information
k8s-ci-robot committed Jul 24, 2023
2 parents 6e879bb + 22bf29a commit 33b63f5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,11 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
// JSON only supports 53 bits because everything is a float
*obj = int64(c.Uint64()) & ((int64(1) << 53) - 1)
},
func(obj *apiextensions.ValidationRule, c fuzz.Continue) {
c.FuzzNoCustom(obj)
if obj.Reason != nil && *(obj.Reason) == "" {
obj.Reason = nil
}
},
}
}

0 comments on commit 33b63f5

Please sign in to comment.