Fix tests using internal types for generic printing

This commit is contained in:
Jordan Liggitt
2016-12-09 13:38:44 -05:00
parent cc7a44f545
commit 12806be2bf
2 changed files with 35 additions and 15 deletions

View File

@@ -1252,11 +1252,13 @@ func (f *factory) PrintObject(cmd *cobra.Command, mapper meta.RESTMapper, obj ru
}
func (f *factory) PrinterForMapping(cmd *cobra.Command, mapping *meta.RESTMapping, withNamespace bool) (kubectl.ResourcePrinter, error) {
printer, ok, err := PrinterForCommand(cmd)
printer, generic, err := PrinterForCommand(cmd)
if err != nil {
return nil, err
}
if ok {
// Make sure we output versioned data for generic printers
if generic {
clientConfig, err := f.ClientConfig()
if err != nil {
return nil, err