@@ -359,9 +359,9 @@ func TestByType(t *testing.T) {
359359 {
360360 Type : "abc" ,
361361 PodsList : api.PodsList {
362- {Type : "abc" , Name : "1" , Started : started , Replicas : 3 },
363- {Type : "abc" , Name : "2" , Started : started , Replicas : 3 },
364- {Type : "abc" , Name : "3" , Started : started , Replicas : 3 },
362+ {Type : "abc" , Name : "1" , Started : started , Replicas : 3 , State : "up" },
363+ {Type : "abc" , Name : "2" , Started : started , Replicas : 3 , State : "up" },
364+ {Type : "abc" , Name : "3" , Started : started , Replicas : 3 , State : "up" },
365365 },
366366 Replicas : 3 ,
367367 Status : "started" ,
@@ -375,36 +375,36 @@ func TestByType(t *testing.T) {
375375 {
376376 Type : "web" ,
377377 PodsList : api.PodsList {
378- {Type : "web" , Name : "test1" , Started : started , Replicas : 3 },
379- {Type : "web" , Name : "test2" , Started : started , Replicas : 3 },
380- {Type : "web" , Name : "test3" , Started : started , Replicas : 3 },
378+ {Type : "web" , Name : "test1" , Started : started , Replicas : 3 , State : "up" },
379+ {Type : "web" , Name : "test2" , Started : started , Replicas : 3 , State : "up" },
380+ {Type : "web" , Name : "test3" , Started : started , Replicas : 3 , State : "up" },
381381 },
382382 Replicas : 3 ,
383383 Status : "started" ,
384384 },
385385 {
386386 Type : "worker" ,
387387 PodsList : api.PodsList {
388- {Type : "worker" , Name : "a" , Started : started , Replicas : 3 },
389- {Type : "worker" , Name : "b" , Started : started , Replicas : 3 },
390- {Type : "worker" , Name : "c" , Started : started , Replicas : 3 },
388+ {Type : "worker" , Name : "a" , Started : started , Replicas : 3 , State : "up" },
389+ {Type : "worker" , Name : "b" , Started : started , Replicas : 3 , State : "up" },
390+ {Type : "worker" , Name : "c" , Started : started , Replicas : 3 , State : "up" },
391391 },
392392 Replicas : 3 ,
393393 Status : "started" ,
394394 },
395395 }
396396
397397 input := api.PodsList {
398- {Type : "worker" , Name : "c" , Started : started , Replicas : 3 },
399- {Type : "abc" , Name : "2" , Started : started , Replicas : 3 },
400- {Type : "worker" , Name : "b" , Started : started , Replicas : 3 },
401- {Type : "web" , Name : "test1" , Started : started , Replicas : 3 },
402- {Type : "web" , Name : "test3" , Started : started , Replicas : 3 },
403- {Type : "abc" , Name : "1" , Started : started , Replicas : 3 },
404- {Type : "worker" , Name : "a" , Started : started , Replicas : 3 },
405- {Type : "abc" , Name : "3" , Started : started , Replicas : 3 },
406- {Type : "web" , Name : "test2" , Started : started , Replicas : 3 },
407- {Type : "job" , Replicas : 3 },
398+ {Type : "worker" , Name : "c" , Started : started , Replicas : 3 , State : "up" },
399+ {Type : "abc" , Name : "2" , Started : started , Replicas : 3 , State : "up" },
400+ {Type : "worker" , Name : "b" , Started : started , Replicas : 3 , State : "up" },
401+ {Type : "web" , Name : "test1" , Started : started , Replicas : 3 , State : "up" },
402+ {Type : "web" , Name : "test3" , Started : started , Replicas : 3 , State : "up" },
403+ {Type : "abc" , Name : "1" , Started : started , Replicas : 3 , State : "up" },
404+ {Type : "worker" , Name : "a" , Started : started , Replicas : 3 , State : "up" },
405+ {Type : "abc" , Name : "3" , Started : started , Replicas : 3 , State : "up" },
406+ {Type : "web" , Name : "test2" , Started : started , Replicas : 3 , State : "up" },
407+ {Type : "job" , Replicas : 3 , State : "stopped" },
408408 }
409409
410410 actual := ByType (input )
0 commit comments