@@ -1130,7 +1130,7 @@ func TestPrintPod(t *testing.T) {
1130
1130
[]metav1.TableRow {{Cells : []interface {}{"test5" , "1/2" , "podReason" , int64 (6 ), "<unknown>" }}},
1131
1131
},
1132
1132
{
1133
- // Test pod has 2 containers, one is running and the other is completed.
1133
+ // Test pod has 2 containers, one is running and the other is completed, w/o ready condition
1134
1134
api.Pod {
1135
1135
ObjectMeta : metav1.ObjectMeta {Name : "test6" },
1136
1136
Spec : api.PodSpec {Containers : make ([]api.Container , 2 )},
@@ -1143,6 +1143,25 @@ func TestPrintPod(t *testing.T) {
1143
1143
},
1144
1144
},
1145
1145
},
1146
+ []metav1.TableRow {{Cells : []interface {}{"test6" , "1/2" , "NotReady" , int64 (6 ), "<unknown>" }}},
1147
+ },
1148
+ {
1149
+ // Test pod has 2 containers, one is running and the other is completed, with ready condition
1150
+ api.Pod {
1151
+ ObjectMeta : metav1.ObjectMeta {Name : "test6" },
1152
+ Spec : api.PodSpec {Containers : make ([]api.Container , 2 )},
1153
+ Status : api.PodStatus {
1154
+ Phase : "Running" ,
1155
+ Reason : "" ,
1156
+ ContainerStatuses : []api.ContainerStatus {
1157
+ {Ready : true , RestartCount : 3 , State : api.ContainerState {Terminated : & api.ContainerStateTerminated {Reason : "Completed" , ExitCode : 0 }}},
1158
+ {Ready : true , RestartCount : 3 , State : api.ContainerState {Running : & api.ContainerStateRunning {}}},
1159
+ },
1160
+ Conditions : []api.PodCondition {
1161
+ {Type : api .PodReady , Status : api .ConditionTrue , LastProbeTime : metav1.Time {Time : time .Now ()}},
1162
+ },
1163
+ },
1164
+ },
1146
1165
[]metav1.TableRow {{Cells : []interface {}{"test6" , "1/2" , "Running" , int64 (6 ), "<unknown>" }}},
1147
1166
},
1148
1167
}
0 commit comments