Ignore unexported fields in import_known_versions_test

Tests currently fail with:

  "import_known_versions_test.go:122: Unexpected type uint in ..."

Closes #53508
This commit is contained in:
Doug MacEachern 2017-10-03 12:53:27 -07:00
parent 3b1b19a1e2
commit 06205696ae

View File

@ -106,6 +106,9 @@ func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, pa
case reflect.Struct:
for i := 0; i < tp.NumField(); i++ {
f := tp.Field(i)
if f.PkgPath != "" {
continue // Ignore unexported fields
}
jsonTag := f.Tag.Get("json")
protoTag := f.Tag.Get("protobuf")
if len(jsonTag) > 0 || len(protoTag) > 0 {