MCPcopy
hub / github.com/moby/moby / TestDiskUsageError

Function TestDiskUsageError

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

Source from the content-addressed store, hash-verified

14)
15
16func TestDiskUsageError(t *testing.T) {
17 client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error")))
18 assert.NilError(t, err)
19 _, err = client.DiskUsage(t.Context(), DiskUsageOptions{})
20 assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal))
21}
22
23func TestDiskUsage(t *testing.T) {
24 const expectedURL = "/system/df"

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…