MCPcopy Create free account
hub / github.com/docker/cli / TestVolumeListSortOrder

Function TestVolumeListSortOrder

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

Source from the content-addressed store, hash-verified

110}
111
112func TestVolumeListSortOrder(t *testing.T) {
113 cli := test.NewFakeCli(&fakeClient{
114 volumeListFunc: func(client.VolumeListOptions) (client.VolumeListResult, error) {
115 return client.VolumeListResult{
116 Items: []volume.Volume{
117 builders.Volume(builders.VolumeName("volume-2-foo")),
118 builders.Volume(builders.VolumeName("volume-10-foo")),
119 builders.Volume(builders.VolumeName("volume-1-foo")),
120 },
121 }, nil
122 },
123 })
124 cmd := newListCommand(cli)
125 assert.Check(t, cmd.Flags().Set("format", "{{ .Name }}"))
126 assert.NilError(t, cmd.Execute())
127 golden.Assert(t, cli.OutBuffer().String(), "volume-list-sort.golden")
128}
129
130func TestClusterVolumeList(t *testing.T) {
131 cli := test.NewFakeCli(&fakeClient{

Callers

nothing calls this directly

Calls 4

OutBufferMethod · 0.95
newListCommandFunction · 0.70
StringMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…