(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestCliNewTagCommandErrors(t *testing.T) { |
| 14 | testCases := [][]string{ |
| 15 | {}, |
| 16 | {"image1"}, |
| 17 | {"image1", "image2", "image3"}, |
| 18 | } |
| 19 | expectedError := "'tag' requires 2 arguments" |
| 20 | for _, args := range testCases { |
| 21 | cmd := newTagCommand(test.NewFakeCli(&fakeClient{})) |
| 22 | cmd.SetArgs(args) |
| 23 | cmd.SetOut(io.Discard) |
| 24 | cmd.SetErr(io.Discard) |
| 25 | assert.ErrorContains(t, cmd.Execute(), expectedError) |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | func TestCliNewTagCommand(t *testing.T) { |
| 30 | cmd := newTagCommand( |
nothing calls this directly
no test coverage detected
searching dependent graphs…