(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestManifestPushErrors(t *testing.T) { |
| 28 | testCases := []struct { |
| 29 | args []string |
| 30 | expectedError string |
| 31 | }{ |
| 32 | { |
| 33 | args: []string{"one-arg", "extra-arg"}, |
| 34 | expectedError: "requires 1 argument", |
| 35 | }, |
| 36 | { |
| 37 | args: []string{"th!si'sa/fa!ke/li$t/-name"}, |
| 38 | expectedError: "invalid reference format", |
| 39 | }, |
| 40 | } |
| 41 | |
| 42 | for _, tc := range testCases { |
| 43 | cli := test.NewFakeCli(nil) |
| 44 | cmd := newPushListCommand(cli) |
| 45 | cmd.SetArgs(tc.args) |
| 46 | cmd.SetOut(io.Discard) |
| 47 | cmd.SetErr(io.Discard) |
| 48 | assert.ErrorContains(t, cmd.Execute(), tc.expectedError) |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | func TestManifestPush(t *testing.T) { |
| 53 | manifestStore := store.NewStore(t.TempDir()) |
nothing calls this directly
no test coverage detected
searching dependent graphs…