(t *testing.T)
| 22 | ) |
| 23 | |
| 24 | func TestNewCmdDelete(t *testing.T) { |
| 25 | tests := []struct { |
| 26 | name string |
| 27 | cli string |
| 28 | wants DeleteOptions |
| 29 | wantsErr bool |
| 30 | }{ |
| 31 | { |
| 32 | name: "no args", |
| 33 | wantsErr: true, |
| 34 | }, |
| 35 | { |
| 36 | name: "repo", |
| 37 | cli: "cool", |
| 38 | wants: DeleteOptions{ |
| 39 | SecretName: "cool", |
| 40 | }, |
| 41 | }, |
| 42 | { |
| 43 | name: "org", |
| 44 | cli: "cool --org anOrg", |
| 45 | wants: DeleteOptions{ |
| 46 | SecretName: "cool", |
| 47 | OrgName: "anOrg", |
| 48 | }, |
| 49 | }, |
| 50 | { |
| 51 | name: "env", |
| 52 | cli: "cool --env anEnv", |
| 53 | wants: DeleteOptions{ |
| 54 | SecretName: "cool", |
| 55 | EnvName: "anEnv", |
| 56 | }, |
| 57 | }, |
| 58 | { |
| 59 | name: "user", |
| 60 | cli: "cool -u", |
| 61 | wants: DeleteOptions{ |
| 62 | SecretName: "cool", |
| 63 | UserSecrets: true, |
| 64 | }, |
| 65 | }, |
| 66 | { |
| 67 | name: "Dependabot repo", |
| 68 | cli: "cool --app Dependabot", |
| 69 | wants: DeleteOptions{ |
| 70 | SecretName: "cool", |
| 71 | Application: "Dependabot", |
| 72 | }, |
| 73 | }, |
| 74 | { |
| 75 | name: "Dependabot org", |
| 76 | cli: "cool --app Dependabot --org UmbrellaCorporation", |
| 77 | wants: DeleteOptions{ |
| 78 | SecretName: "cool", |
| 79 | OrgName: "UmbrellaCorporation", |
| 80 | Application: "Dependabot", |
| 81 | }, |
nothing calls this directly
no test coverage detected