@@ -25,7 +25,7 @@ const processesFixture string = `
2525 "name": "example-go-v2-web-45678",
2626 "state": "up",
2727 "started": "2016-02-13T00:47:52",
28- "replicas": 1
28+ "replicas": "1"
2929 }
3030 ]
3131}`
@@ -37,7 +37,7 @@ const restartAllFixture string = `[
3737 "name": "example-go-v2-web-45678",
3838 "state": "up",
3939 "started": "2016-02-13T00:47:52",
40- "replicas": 1
40+ "replicas": "1"
4141 }
4242]
4343`
@@ -49,7 +49,7 @@ const restartWorkerFixture string = `[
4949 "name": "example-go-v2-worker-45678",
5050 "state": "up",
5151 "started": "2016-02-13T00:47:52",
52- "replicas": 1
52+ "replicas": "1"
5353 }
5454]
5555`
@@ -61,7 +61,7 @@ const restartWebTwoFixture string = `[
6161 "name": "example-go-v2-web-45678",
6262 "state": "up",
6363 "started": "2016-02-13T00:47:52",
64- "replicas": 1
64+ "replicas": "1"
6565 }
6666]
6767`
@@ -182,7 +182,7 @@ func TestProcessesList(t *testing.T) {
182182 Name : "example-go-v2-web-45678" ,
183183 State : "up" ,
184184 Started : started ,
185- Replicas : 1 ,
185+ Replicas : "1" ,
186186 },
187187 }
188188
@@ -228,7 +228,7 @@ func TestAppsRestart(t *testing.T) {
228228 Name : "example-go-v2-web-45678" ,
229229 State : "up" ,
230230 Started : started ,
231- Replicas : 1 ,
231+ Replicas : "1" ,
232232 },
233233 },
234234 },
@@ -242,7 +242,7 @@ func TestAppsRestart(t *testing.T) {
242242 Name : "example-go-v2-worker-45678" ,
243243 State : "up" ,
244244 Started : started ,
245- Replicas : 1 ,
245+ Replicas : "1" ,
246246 },
247247 },
248248 },
@@ -256,7 +256,7 @@ func TestAppsRestart(t *testing.T) {
256256 Name : "example-go-v2-worker-45678" ,
257257 State : "up" ,
258258 Started : started ,
259- Replicas : 1 ,
259+ Replicas : "1" ,
260260 },
261261 },
262262 },
@@ -270,7 +270,7 @@ func TestAppsRestart(t *testing.T) {
270270 Name : "example-go-v2-web-45678" ,
271271 State : "up" ,
272272 Started : started ,
273- Replicas : 1 ,
273+ Replicas : "1" ,
274274 },
275275 },
276276 },
@@ -359,52 +359,52 @@ func TestByType(t *testing.T) {
359359 {
360360 Type : "abc" ,
361361 PodsList : api.PodsList {
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" },
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 },
366- Replicas : 3 ,
366+ Replicas : "3" ,
367367 Status : "started" ,
368368 },
369369 {
370370 Type : "job" ,
371371 PodsList : api.PodsList {},
372- Replicas : 3 ,
372+ Replicas : "3" ,
373373 Status : "stopped" ,
374374 },
375375 {
376376 Type : "web" ,
377377 PodsList : api.PodsList {
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" },
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 },
382- Replicas : 3 ,
382+ Replicas : "3" ,
383383 Status : "started" ,
384384 },
385385 {
386386 Type : "worker" ,
387387 PodsList : api.PodsList {
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" },
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 },
392- Replicas : 3 ,
392+ Replicas : "3" ,
393393 Status : "started" ,
394394 },
395395 }
396396
397397 input := api.PodsList {
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" },
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