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

Function TestSystemUpdate

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

Source from the content-addressed store, hash-verified

178}
179
180func 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
202func TestSystemUpdateError(t *testing.T) {
203 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {

Callers

nothing calls this directly

Calls 3

IntFunction · 0.92
StringFunction · 0.92
testServerFunction · 0.70

Tested by

no test coverage detected