MCPcopy
hub / github.com/moby/moby / TestEventsErrorFromServer

Function TestEventsErrorFromServer

client/system_events_test.go:45–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestEventsErrorFromServer(t *testing.T) {
46 client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error")))
47 assert.NilError(t, err)
48 res := client.Events(t.Context(), EventsListOptions{})
49 err = <-res.Err
50 assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal))
51}
52
53func TestEvents(t *testing.T) {
54 const expectedURL = "/events"

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…