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

Function TestSystemUpdate

sdk/methods_test.go:1476–1495  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1474}
1475
1476func 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}

Callers

nothing calls this directly

Calls 4

IntFunction · 0.92
StringFunction · 0.92
testServerFunction · 0.70
SystemUpdateMethod · 0.65

Tested by

no test coverage detected