From 142f142ccc8eac64a8536d3b9be8770b4fc96eb7 Mon Sep 17 00:00:00 2001 From: zhangxiaoyu-zidif Date: Wed, 26 Jul 2017 10:20:08 +0800 Subject: [PATCH] change Errorf to Error when no printer format --- pkg/kubectl/cmd/get_test.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/kubectl/cmd/get_test.go b/pkg/kubectl/cmd/get_test.go index e2c80d5f629..2b2edec38d5 100644 --- a/pkg/kubectl/cmd/get_test.go +++ b/pkg/kubectl/cmd/get_test.go @@ -214,7 +214,7 @@ func TestGetObjectsWithOpenAPIOutputFormatPresent(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -260,7 +260,7 @@ func TestGetObjects(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -412,7 +412,7 @@ func TestGetSortedObjects(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -466,7 +466,7 @@ func TestGetObjectsIdentifiedByFile(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -495,7 +495,7 @@ func TestGetListObjects(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -537,7 +537,7 @@ func TestGetAllListObjects(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -566,7 +566,7 @@ func TestGetListComponentStatus(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -605,7 +605,7 @@ func TestGetMultipleTypeObjects(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -714,7 +714,7 @@ func TestGetMultipleTypeObjectsWithSelector(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -759,7 +759,7 @@ func TestGetMultipleTypeObjectsWithDirectReference(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -784,7 +784,7 @@ func TestGetByFormatForcesFlag(t *testing.T) { showAllFlag, _ := cmd.Flags().GetBool("show-all") if showAllFlag { - t.Errorf("expected showAll to not be true when getting resource") + t.Error("expected showAll to not be true when getting resource") } } @@ -904,7 +904,7 @@ func TestWatchSelector(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -946,7 +946,7 @@ func TestWatchResource(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -989,7 +989,7 @@ func TestWatchResourceIdentifiedByFile(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -1031,7 +1031,7 @@ func TestWatchOnlyResource(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } } @@ -1077,7 +1077,7 @@ func TestWatchOnlyList(t *testing.T) { verifyObjects(t, expected, tf.Printer.(*testPrinter).Objects) if len(buf.String()) == 0 { - t.Errorf("unexpected empty output") + t.Error("unexpected empty output") } }