• Kubernetes Submit Queue's avatar
    Merge pull request #55283 from spzala/unreachabletest · 45f8017e
    Kubernetes Submit Queue authored
    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
    ```
    45f8017e
Name
Last commit
Last update
..
BUILD Loading commit data...
OWNERS Loading commit data...
explain.go Loading commit data...
field_lookup.go Loading commit data...
field_lookup_test.go Loading commit data...
fields_printer.go Loading commit data...
fields_printer_builder.go Loading commit data...
fields_printer_test.go Loading commit data...
formatter.go Loading commit data...
formatter_test.go Loading commit data...
model_printer.go Loading commit data...
model_printer_test.go Loading commit data...
recursive_fields_printer.go Loading commit data...
recursive_fields_printer_test.go Loading commit data...
test-swagger.json Loading commit data...
typename.go Loading commit data...
typename_test.go Loading commit data...