kubernetes/pkg/kubectl/explain
Kubernetes Submit Queue 45f8017e6d
Merge pull request #55283 from spzala/unreachabletest
Automatic merge from submit-queue (batch tested with PRs 55283, 55461, 55288, 53970, 55487). 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>.

Fix an unreachable kubectl explain field lookup test

In error case, the condition `gotErr != test.err && gotPath !=
test.expectedPath` never fulfill because in this case both gotPath and
test.expectedPath are always an empty string. So the err “err:  `field "what?"
does not exist`” doesn’t get tasted. For example, if you change the value of
`err:` to anything, the test still will pass. Also, since gotPath is empty
string in case of err, in the output error we probably don’t want to display
path. 



**What this PR does / why we need it**:
Fixes an unreachable unit test.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-11-13 12:32:18 -08:00
..
BUILD Update openapi to use kube-openapi code 2017-10-20 09:21:06 -07:00
explain.go Update openapi to use kube-openapi code 2017-10-20 09:21:06 -07:00
field_lookup_test.go Fix an unreachable kubectl explain field lookup test 2017-11-10 11:32:57 -05:00
field_lookup.go Update openapi to use kube-openapi code 2017-10-20 09:21:06 -07:00
fields_printer_builder.go
fields_printer_test.go Add test for explain 2017-10-03 09:48:36 -07:00
fields_printer.go Update openapi to use kube-openapi code 2017-10-20 09:21:06 -07:00
formatter_test.go Add test for explain 2017-10-03 09:48:36 -07:00
formatter.go
model_printer_test.go Add test for explain 2017-10-03 09:48:36 -07:00
model_printer.go Update openapi to use kube-openapi code 2017-10-20 09:21:06 -07:00
OWNERS Add apelisse to OWNERS 2017-11-09 15:39:31 -08:00
recursive_fields_printer_test.go Add test for explain 2017-10-03 09:48:36 -07:00
recursive_fields_printer.go Update openapi to use kube-openapi code 2017-10-20 09:21:06 -07:00
test-swagger.json Add test for explain 2017-10-03 09:48:36 -07:00
typename_test.go Add test for explain 2017-10-03 09:48:36 -07:00
typename.go Update openapi to use kube-openapi code 2017-10-20 09:21:06 -07:00