(t *testing.T)
| 128 | } |
| 129 | |
| 130 | func 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 | |
| 149 | func TestSystemProcessesError(t *testing.T) { |
| 150 | testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) { |
nothing calls this directly
no test coverage detected