(t *testing.T)
| 178 | } |
| 179 | |
| 180 | func TestSystemUpdate(t *testing.T) { |
| 181 | testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) { |
| 182 | opts := structs.SystemUpdateOptions{ |
| 183 | Count: options.Int(1), |
| 184 | Parameters: map[string]string{"k1": "v1", "k2": "v2"}, |
| 185 | Type: options.String("type"), |
| 186 | Version: options.String("version"), |
| 187 | } |
| 188 | ro := stdsdk.RequestOptions{ |
| 189 | Params: stdsdk.Params{ |
| 190 | "count": "1", |
| 191 | "parameters": "k1=v1&k2=v2", |
| 192 | "type": "type", |
| 193 | "version": "version", |
| 194 | }, |
| 195 | } |
| 196 | p.On("SystemUpdate", opts).Return(nil) |
| 197 | err := c.Put("/system", ro, nil) |
| 198 | require.NoError(t, err) |
| 199 | }) |
| 200 | } |
| 201 | |
| 202 | func TestSystemUpdateError(t *testing.T) { |
| 203 | testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) { |
nothing calls this directly
no test coverage detected