MCPcopy
hub / github.com/moby/moby / TestImageInspectImageNotFound

Function TestImageInspectImageNotFound

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

Source from the content-addressed store, hash-verified

22}
23
24func TestImageInspectImageNotFound(t *testing.T) {
25 client, err := New(WithMockClient(errorMock(http.StatusNotFound, "Server error")))
26 assert.NilError(t, err)
27
28 _, err = client.ImageInspect(t.Context(), "unknown")
29 assert.Check(t, is.ErrorType(err, cerrdefs.IsNotFound))
30}
31
32func TestImageInspectWithEmptyID(t *testing.T) {
33 client, err := New(WithMockClient(func(req *http.Request) (*http.Response, 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…