@@ -41,7 +41,7 @@ func testPrintNamespace(obj *corev1.Namespace, options PrintOptions) ([]metav1be
41
41
row := metav1beta1.TableRow {
42
42
Object : runtime.RawExtension {Object : obj },
43
43
}
44
- row .Cells = append (row .Cells , obj .Name , obj .Status .Phase , "<unknow >" )
44
+ row .Cells = append (row .Cells , obj .Name , obj .Status .Phase , "<unknown >" )
45
45
return []metav1beta1.TableRow {row }, nil
46
46
}
47
47
@@ -50,7 +50,7 @@ func TestPrintRowsForHandlerEntry(t *testing.T) {
50
50
51
51
testCase := []struct {
52
52
name string
53
- h * handlerEntry
53
+ h * printHandler
54
54
opt PrintOptions
55
55
eventType string
56
56
obj runtime.Object
@@ -60,7 +60,7 @@ func TestPrintRowsForHandlerEntry(t *testing.T) {
60
60
}{
61
61
{
62
62
name : "no tablecolumndefinition and includeheader flase" ,
63
- h : & handlerEntry {
63
+ h : & printHandler {
64
64
columnDefinitions : []metav1beta1.TableColumnDefinition {},
65
65
printFunc : printFunc ,
66
66
},
@@ -69,11 +69,11 @@ func TestPrintRowsForHandlerEntry(t *testing.T) {
69
69
ObjectMeta : metav1.ObjectMeta {Name : "test" },
70
70
},
71
71
includeHeader : false ,
72
- expectOut : "test\t \t <unknow >\n " ,
72
+ expectOut : "test\t \t <unknown >\n " ,
73
73
},
74
74
{
75
75
name : "no tablecolumndefinition and includeheader true" ,
76
- h : & handlerEntry {
76
+ h : & printHandler {
77
77
columnDefinitions : []metav1beta1.TableColumnDefinition {},
78
78
printFunc : printFunc ,
79
79
},
@@ -82,11 +82,11 @@ func TestPrintRowsForHandlerEntry(t *testing.T) {
82
82
ObjectMeta : metav1.ObjectMeta {Name : "test" },
83
83
},
84
84
includeHeader : true ,
85
- expectOut : "\n test\t \t <unknow >\n " ,
85
+ expectOut : "\n test\t \t <unknown >\n " ,
86
86
},
87
87
{
88
88
name : "have tablecolumndefinition and includeheader true" ,
89
- h : & handlerEntry {
89
+ h : & printHandler {
90
90
columnDefinitions : testNamespaceColumnDefinitions ,
91
91
printFunc : printFunc ,
92
92
},
@@ -95,11 +95,11 @@ func TestPrintRowsForHandlerEntry(t *testing.T) {
95
95
ObjectMeta : metav1.ObjectMeta {Name : "test" },
96
96
},
97
97
includeHeader : true ,
98
- expectOut : "NAME\t STATUS\t AGE\n test\t \t <unknow >\n " ,
98
+ expectOut : "NAME\t STATUS\t AGE\n test\t \t <unknown >\n " ,
99
99
},
100
100
{
101
101
name : "with event type" ,
102
- h : & handlerEntry {
102
+ h : & printHandler {
103
103
columnDefinitions : testNamespaceColumnDefinitions ,
104
104
printFunc : printFunc ,
105
105
},
@@ -109,11 +109,11 @@ func TestPrintRowsForHandlerEntry(t *testing.T) {
109
109
ObjectMeta : metav1.ObjectMeta {Name : "test" },
110
110
},
111
111
includeHeader : true ,
112
- expectOut : "EVENT\t NAME\t STATUS\t AGE\n ADDED \t test\t \t <unknow >\n " ,
112
+ expectOut : "EVENT\t NAME\t STATUS\t AGE\n ADDED \t test\t \t <unknown >\n " ,
113
113
},
114
114
{
115
115
name : "print namespace and withnamespace true, should not print header" ,
116
- h : & handlerEntry {
116
+ h : & printHandler {
117
117
columnDefinitions : testNamespaceColumnDefinitions ,
118
118
printFunc : printFunc ,
119
119
},
0 commit comments