(t *testing.T)
| 1474 | } |
| 1475 | |
| 1476 | func TestSystemUpdate(t *testing.T) { |
| 1477 | s := stdapi.New("api", "api") |
| 1478 | s.Route("PUT", fmt.Sprintf("/system"), func(c *stdapi.Context) error { |
| 1479 | require.Equal(t, "2", c.Form("count")) |
| 1480 | require.Equal(t, "hello=world", c.Form("parameters")) |
| 1481 | require.Equal(t, "type", c.Form("type")) |
| 1482 | require.Equal(t, "version", c.Form("version")) |
| 1483 | return c.RenderOK() |
| 1484 | }) |
| 1485 | |
| 1486 | testServer(t, s, func(c *sdk.Client) { |
| 1487 | err := c.SystemUpdate(structs.SystemUpdateOptions{ |
| 1488 | Count: options.Int(2), |
| 1489 | Parameters: map[string]string{"hello": "world"}, |
| 1490 | Type: options.String("type"), |
| 1491 | Version: options.String("version"), |
| 1492 | }) |
| 1493 | require.NoError(t, err) |
| 1494 | }) |
| 1495 | } |
nothing calls this directly
no test coverage detected