MCPcopy Index your code
hub / github.com/docker/cli / TestVolumeListWithoutFormat

Function TestVolumeListWithoutFormat

cli/command/volume/list_test.go:51–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestVolumeListWithoutFormat(t *testing.T) {
52 cli := test.NewFakeCli(&fakeClient{
53 volumeListFunc: func(client.VolumeListOptions) (client.VolumeListResult, error) {
54 return client.VolumeListResult{
55 Items: []volume.Volume{
56 builders.Volume(),
57 builders.Volume(builders.VolumeName("foo"), builders.VolumeDriver("bar")),
58 builders.Volume(builders.VolumeName("baz"), builders.VolumeLabels(map[string]string{
59 "foo": "bar",
60 })),
61 },
62 }, nil
63 },
64 })
65 cmd := newListCommand(cli)
66 assert.NilError(t, cmd.Execute())
67 golden.Assert(t, cli.OutBuffer().String(), "volume-list-without-format.golden")
68}
69
70func TestVolumeListWithConfigFormat(t *testing.T) {
71 cli := test.NewFakeCli(&fakeClient{

Callers

nothing calls this directly

Calls 3

OutBufferMethod · 0.95
newListCommandFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…