Commit 06205696 authored by Doug MacEachern's avatar Doug MacEachern

Ignore unexported fields in import_known_versions_test

Tests currently fail with: "import_known_versions_test.go:122: Unexpected type uint in ..." Closes #53508
parent 3b1b19a1
...@@ -106,6 +106,9 @@ func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, pa ...@@ -106,6 +106,9 @@ func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, pa
case reflect.Struct: case reflect.Struct:
for i := 0; i < tp.NumField(); i++ { for i := 0; i < tp.NumField(); i++ {
f := tp.Field(i) f := tp.Field(i)
if f.PkgPath != "" {
continue // Ignore unexported fields
}
jsonTag := f.Tag.Get("json") jsonTag := f.Tag.Get("json")
protoTag := f.Tag.Get("protobuf") protoTag := f.Tag.Get("protobuf")
if len(jsonTag) > 0 || len(protoTag) > 0 { if len(jsonTag) > 0 || len(protoTag) > 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment