(t *testing.T)
| 225 | } |
| 226 | |
| 227 | func TestGetEngineSecretDescription(t *testing.T) { |
| 228 | tests := []struct { |
| 229 | name string |
| 230 | engineValue string |
| 231 | wantContains string |
| 232 | }{ |
| 233 | { |
| 234 | name: "copilot engine description", |
| 235 | engineValue: string(constants.CopilotEngine), |
| 236 | wantContains: "Fine-grained PAT", |
| 237 | }, |
| 238 | { |
| 239 | name: "claude engine description", |
| 240 | engineValue: string(constants.ClaudeEngine), |
| 241 | wantContains: "Anthropic Console", |
| 242 | }, |
| 243 | { |
| 244 | name: "codex engine description", |
| 245 | engineValue: string(constants.CodexEngine), |
| 246 | wantContains: "OpenAI", |
| 247 | }, |
| 248 | } |
| 249 | |
| 250 | for _, tt := range tests { |
| 251 | t.Run(tt.name, func(t *testing.T) { |
| 252 | opt := constants.GetEngineOption(tt.engineValue) |
| 253 | require.NotNil(t, opt, "Engine option should exist for %s", tt.engineValue) |
| 254 | |
| 255 | desc := getEngineSecretDescription(opt) |
| 256 | assert.Contains(t, desc, tt.wantContains, |
| 257 | "Description should contain %q", tt.wantContains) |
| 258 | }) |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | func TestSecretRequirementStructure(t *testing.T) { |
| 263 | t.Run("SecretRequirement has all required fields", func(t *testing.T) { |
nothing calls this directly
no test coverage detected