(t *testing.T)
| 49 | } |
| 50 | |
| 51 | func 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 | |
| 70 | func TestVolumeListWithConfigFormat(t *testing.T) { |
| 71 | cli := test.NewFakeCli(&fakeClient{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…