begin wiring printflags through set cmds

This commit is contained in:
juanvallejo
2018-04-04 15:25:51 -04:00
parent 2bf111a619
commit 4b4b6c879a
11 changed files with 198 additions and 71 deletions

View File

@@ -61,14 +61,14 @@ func TestPrinterSupportsExpectedJSONYamlFormats(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
printFlags := printers.JSONYamlPrintFlags{}
p, matched, err := printFlags.ToPrinter(tc.outputFormat)
p, err := printFlags.ToPrinter(tc.outputFormat)
if tc.expectNoMatch {
if matched {
if !printers.IsNoCompatiblePrinterError(err) {
t.Fatalf("expected no printer matches for output format %q", tc.outputFormat)
}
return
}
if !matched {
if printers.IsNoCompatiblePrinterError(err) {
t.Fatalf("expected to match template printer for output format %q", tc.outputFormat)
}
if err != nil {