MCPcopy Create free account
hub / github.com/convox/rack / TestProcessList

Function TestProcessList

pkg/api/process_test.go:154–171  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

152}
153
154func TestProcessList(t *testing.T) {
155 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
156 p1 := structs.Processes{fxProcess, fxProcess}
157 p2 := structs.Processes{}
158 opts := structs.ProcessListOptions{
159 Service: options.String("service"),
160 }
161 ro := stdsdk.RequestOptions{
162 Query: stdsdk.Query{
163 "service": "service",
164 },
165 }
166 p.On("ProcessList", "app1", opts).Return(p1, nil)
167 err := c.Get("/apps/app1/processes", ro, &p2)
168 require.NoError(t, err)
169 require.Equal(t, p1, p2)
170 })
171}
172
173func TestProcessListError(t *testing.T) {
174 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {

Callers

nothing calls this directly

Calls 3

StringFunction · 0.92
testServerFunction · 0.70
GetMethod · 0.65

Tested by

no test coverage detected