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

Function TestSystemProcesses

pkg/api/system_test.go:130–147  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

128}
129
130func TestSystemProcesses(t *testing.T) {
131 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
132 p1 := structs.Processes{fxProcess, fxProcess}
133 p2 := structs.Processes{}
134 opts := structs.SystemProcessesOptions{
135 All: options.Bool(true),
136 }
137 ro := stdsdk.RequestOptions{
138 Query: stdsdk.Query{
139 "all": "true",
140 },
141 }
142 p.On("SystemProcesses", opts).Return(p1, nil)
143 err := c.Get("/system/processes", ro, &p2)
144 require.NoError(t, err)
145 require.Equal(t, p1, p2)
146 })
147}
148
149func TestSystemProcessesError(t *testing.T) {
150 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {

Callers

nothing calls this directly

Calls 3

BoolFunction · 0.92
testServerFunction · 0.70
GetMethod · 0.65

Tested by

no test coverage detected