mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #41279 from apprenda/api-round-trip-docs
Automatic merge from submit-queue updated docs in roundtrip.go to correct names **What this PR does / why we need it**: updated docs in roundtrip.go to correct names. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
d46dc10b49
@ -40,7 +40,7 @@ import (
|
||||
|
||||
var FuzzIters = flag.Int("fuzz-iters", 20, "How many fuzzing iterations to do.")
|
||||
|
||||
// nonRoundTrippableTypes are kinds that are effectively reserved across all GroupVersions
|
||||
// globalNonRoundTrippableTypes are kinds that are effectively reserved across all GroupVersions
|
||||
// They don't roundtrip
|
||||
var globalNonRoundTrippableTypes = sets.NewString(
|
||||
"ExportOptions",
|
||||
@ -56,7 +56,7 @@ var globalNonRoundTrippableTypes = sets.NewString(
|
||||
"DeleteOptions",
|
||||
)
|
||||
|
||||
// RoundTripTypes applies the round-trip test to all round-trippable Kinds
|
||||
// RoundTripTypesWithoutProtobuf applies the round-trip test to all round-trippable Kinds
|
||||
// in the scheme. It will skip all the GroupVersionKinds in the skip list.
|
||||
func RoundTripTypesWithoutProtobuf(t *testing.T, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool) {
|
||||
roundTripTypes(t, scheme, codecFactory, fuzzer, nonRoundTrippableTypes, true)
|
||||
@ -214,7 +214,7 @@ func roundTrip(t *testing.T, scheme *runtime.Scheme, codec runtime.Codec, object
|
||||
// ensure that the object produced from decoding the encoded data is equal
|
||||
// to the original object
|
||||
if !apiequality.Semantic.DeepEqual(original, obj2) {
|
||||
t.Errorf("\n1: %v: diff: %v\nCodec: %#v\nSource:\n\n%#v\n\nEncoded:\n\n%s\n\nFinal:\n\n%#v", name, diff.ObjectReflectDiff(object, obj2), codec, printer.Sprintf("%#v", object), dataAsString(data), printer.Sprintf("%#v", obj2))
|
||||
t.Errorf("1: %v: diff: %v\nCodec: %#v\nSource:\n\n%#v\n\nEncoded:\n\n%s\n\nFinal:\n\n%#v", name, diff.ObjectReflectDiff(object, obj2), codec, printer.Sprintf("%#v", object), dataAsString(data), printer.Sprintf("%#v", obj2))
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user