MCPcopy
hub / github.com/moby/moby / TestImageInspectError

Function TestImageInspectError

client/image_inspect_test.go:16–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestImageInspectError(t *testing.T) {
17 client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error")))
18 assert.NilError(t, err)
19
20 _, err = client.ImageInspect(t.Context(), "nothing")
21 assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal))
22}
23
24func TestImageInspectImageNotFound(t *testing.T) {
25 client, err := New(WithMockClient(errorMock(http.StatusNotFound, "Server error")))

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…