Commit Graph

5 Commits (7cbe2d6c5f4c3b00d482dc7de3bfd1831ff0e861)

Author SHA1 Message Date
Maciej Szulik 22a3f6de5e
Add missing VisitArbitrary methods in kubectl explain 2019-02-14 13:06:20 +01:00
Guoliang Wang bae074ef38 use subtest for table units (pkg/kubectl) 2018-05-27 10:04:55 +08:00
Nikhita Raghunath 4add679528 kubectl explain: ignore trailing period
kubectl explain ingress.spec.rules.http.paths. is valid
and defaults to kubectl explain ingress.spec.rules.http.paths

Rational: We use kubectl explain by adding fields
(e.g. service, then service.spec, then service.spec.ports ...)
so it's very easy to forget a trailing . at the end. We should
ignore the trailing period and display the result without it.
2017-11-15 17:52:04 +05:30
Sahdev P. Zala 32d8fa0058 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 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.
2017-11-10 11:32:57 -05:00
Antoine Pelisse 094116ac9a Add test for explain 2017-10-03 09:48:36 -07:00