Skip to content

Commit

Permalink
Merge pull request #53402 from dougm/import-known-versions-test
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 53418, 53366, 53115, 53402, 53130). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Ignore unexported fields in import_known_versions_test

Tests currently fail with:

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

**What this PR does / why we need it**:

Running `make test` against the latest (f11a551) fails for me with:

```
import_known_versions_test.go:122: Unexpected type uint in schema.GroupVersionKind{Group:"apps", Version:"__internal", Kind:"DaemonSet"}

        import_known_versions_test.go:122: Unexpected type uint in schema.GroupVersionKind{Group:"apps", Version:"__internal", Kind:"DaemonSet"}
        import_known_versions_test.go:124: extensions.DaemonSet:
        import_known_versions_test.go:124:   extensions.DaemonSetSpec:
        import_known_versions_test.go:124:     api.PodTemplateSpec:
        import_known_versions_test.go:124:       api.PodSpec:
        import_known_versions_test.go:124:         []api.Container:
        import_known_versions_test.go:124:           api.Container:
        import_known_versions_test.go:124:             []api.EnvVar:
        import_known_versions_test.go:124:               api.EnvVar:
        import_known_versions_test.go:124:                 *api.EnvVarSource:
        import_known_versions_test.go:124:                   api.EnvVarSource:
        import_known_versions_test.go:124:                     *api.ResourceFieldSelector:
        import_known_versions_test.go:124:                       api.ResourceFieldSelector:
        import_known_versions_test.go:124:                         resource.Quantity:
        import_known_versions_test.go:124:                           resource.infDecAmount:
        import_known_versions_test.go:124:                             *inf.Dec:
        import_known_versions_test.go:124:                               inf.Dec:
        import_known_versions_test.go:124:                                 big.Int:
        import_known_versions_test.go:124:                                   big.nat:
        import_known_versions_test.go:124:                                     big.Word:
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53508

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
  • Loading branch information
Kubernetes Submit Queue committed Oct 6, 2017
2 parents 536f9ac + 0620569 commit feb92e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/master/import_known_versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit feb92e1

Please sign in to comment.