MCPcopy
hub / github.com/moby/moby / TestServiceCreateError

Function TestServiceCreateError

client/service_create_test.go:20–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18)
19
20func TestServiceCreateError(t *testing.T) {
21 client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error")))
22 assert.NilError(t, err)
23 _, err = client.ServiceCreate(t.Context(), ServiceCreateOptions{})
24 assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal))
25}
26
27// TestServiceCreateConnectionError verifies that connection errors occurring
28// during API-version negotiation are not shadowed by API-version errors.

Callers

nothing calls this directly

Calls 6

WithMockClientFunction · 0.85
errorMockFunction · 0.85
CheckMethod · 0.80
NewFunction · 0.70
ServiceCreateMethod · 0.65
ContextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…