(t *testing.T)
| 119 | } |
| 120 | |
| 121 | func TestVolumePruneForce(t *testing.T) { |
| 122 | testCases := []struct { |
| 123 | name string |
| 124 | volumePruneFunc func(options client.VolumePruneOptions) (client.VolumePruneResult, error) |
| 125 | }{ |
| 126 | { |
| 127 | name: "empty", |
| 128 | }, |
| 129 | { |
| 130 | name: "deletedVolumes", |
| 131 | volumePruneFunc: simplePruneFunc, |
| 132 | }, |
| 133 | } |
| 134 | for _, tc := range testCases { |
| 135 | cli := test.NewFakeCli(&fakeClient{ |
| 136 | volumePruneFunc: tc.volumePruneFunc, |
| 137 | }) |
| 138 | cmd := newPruneCommand(cli) |
| 139 | cmd.Flags().Set("force", "true") |
| 140 | assert.NilError(t, cmd.Execute()) |
| 141 | golden.Assert(t, cli.OutBuffer().String(), fmt.Sprintf("volume-prune.%s.golden", tc.name)) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | func TestVolumePrunePromptYes(t *testing.T) { |
| 146 | // FIXME(vdemeester) make it work.. |
nothing calls this directly
no test coverage detected
searching dependent graphs…