(t *testing.T)
| 110 | } |
| 111 | |
| 112 | func 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 | |
| 130 | func TestClusterVolumeList(t *testing.T) { |
| 131 | cli := test.NewFakeCli(&fakeClient{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…