Skip to content

Commit 853d55b

Browse files
authored
Merge pull request #17 from jianxiaoguo/main
chore(ps):drycc ps:list show autoscale num
2 parents cd7133d + 0e18841 commit 853d55b

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

cmd/apps_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func TestAppsInfo(t *testing.T) {
142142
"name": "lorem-ipsum-cmd-1911796442-48b58",
143143
"release": "v2",
144144
"type": "cmd",
145-
"replicas": 1
145+
"replicas": "1"
146146
}
147147
]
148148
}`)

cmd/ps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func printProcesses(appID string, input []api.Pods, wOut io.Writer) {
168168
fmt.Fprintf(wOut, "=== %s Processes\n", appID)
169169

170170
for _, process := range processes {
171-
fmt.Fprintf(wOut, "--- %s (%s): %d\n", process.Type, process.Status, process.Replicas)
171+
fmt.Fprintf(wOut, "--- %s (%s): %s\n", process.Type, process.Status, process.Replicas)
172172

173173
for _, pod := range process.PodsList {
174174
fmt.Fprintf(wOut, "%s %s (%s)\n", pod.Name, pod.State, pod.Release)

cmd/ps_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ func TestPrintProcesses(t *testing.T) {
5959
Type: "web",
6060
State: "up",
6161
Started: time.Time{},
62-
Replicas: 1,
62+
Replicas: "1",
6363
},
6464
{
6565
Release: "v3",
6666
Name: "benign-quilting-worker-4084101150-c871y",
6767
Type: "worker",
6868
State: "up",
6969
Started: time.Time{},
70-
Replicas: 1,
70+
Replicas: "1",
7171
},
7272
}
7373

@@ -104,7 +104,7 @@ func TestPsList(t *testing.T) {
104104
"name": "foo-web-4084101150-c871y",
105105
"state": "up",
106106
"started": "2016-02-13T00:47:52",
107-
"replicas": 1
107+
"replicas": "1"
108108
}
109109
]
110110
}`)
@@ -175,7 +175,7 @@ func TestPsScale(t *testing.T) {
175175
"name": "foo-web-4084101150-c871y",
176176
"state": "up",
177177
"started": "2016-02-13T00:47:52",
178-
"replicas": 1
178+
"replicas": "1"
179179
}
180180
]
181181
}`)
@@ -217,7 +217,7 @@ func TestPsRestart(t *testing.T) {
217217
"name": "foo-web-4084101150-c871y",
218218
"state": "up",
219219
"started": "2016-02-13T00:47:52",
220-
"replicas": 1
220+
"replicas": "1"
221221
}
222222
]`)
223223
})
@@ -254,7 +254,7 @@ Could not find any processes to restart
254254
"name": "testapp-web-4084101150-c871y",
255255
"state": "up",
256256
"started": "2016-02-13T00:47:52",
257-
"replicas": 1
257+
"replicas": "1"
258258
}
259259
]`)
260260
})
@@ -279,7 +279,7 @@ testapp-web-4084101150-c871y up (v2)
279279
"name": "newapp-web-4084101150-c871y",
280280
"state": "up",
281281
"started": "2016-02-13T00:47:52",
282-
"replicas": 1
282+
"replicas": "1"
283283
}
284284
]`)
285285
})

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.13
55
require (
66
github.com/arschles/assert v1.0.1-0.20191213221312-71f210f9375a
77
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
8-
github.com/drycc/controller-sdk-go v0.0.0-20201105013635-42fda9fec714
8+
github.com/drycc/controller-sdk-go v0.0.0-20201117012836-c2e1396c3333
99
github.com/drycc/pkg v0.0.0-20200811173146-1f2b2781a852
1010
github.com/olekukonko/tablewriter v0.0.4
1111
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ github.com/drycc/controller-sdk-go v0.0.0-20201015015256-370f01036885/go.mod h1:
4747
github.com/drycc/controller-sdk-go v0.0.0-20201015065118-cb8f4f5e9745 h1:C3Byx1KvZtzuilCp5aikRa5hbXCUhiy8u4Iv6ATyDcI=
4848
github.com/drycc/controller-sdk-go v0.0.0-20201015065118-cb8f4f5e9745/go.mod h1:mF8/kZ/E4oDHCtfUVS790Frm8oVzZkoCGCKYT2eWQro=
4949
github.com/drycc/controller-sdk-go v0.0.0-20201105013635-42fda9fec714/go.mod h1:mF8/kZ/E4oDHCtfUVS790Frm8oVzZkoCGCKYT2eWQro=
50+
github.com/drycc/controller-sdk-go v0.0.0-20201117012836-c2e1396c3333 h1:BzGLCDwKVS1btrf2HhcNwtcDGwBYbGl0U6147IFfTUc=
51+
github.com/drycc/controller-sdk-go v0.0.0-20201117012836-c2e1396c3333/go.mod h1:mF8/kZ/E4oDHCtfUVS790Frm8oVzZkoCGCKYT2eWQro=
5052
github.com/drycc/pkg v0.0.0-20190129033019-bcdffff0fcb3 h1:QRAbL97/hJecXQzaSONMCiwt1JjBKAAMKK0qJW5sgIM=
5153
github.com/drycc/pkg v0.0.0-20190129033019-bcdffff0fcb3/go.mod h1:zNgTT6kuGZOKMIdSrjskIw5fctdbbszqiTPEt3ffxHw=
5254
github.com/drycc/pkg v0.0.0-20200811173146-1f2b2781a852 h1:OsWH7jrv2i32rkvHFuj3yVpGMR+A6heRge9tm01XR/U=

0 commit comments

Comments
 (0)