(t *testing.T)
| 253 | } |
| 254 | |
| 255 | func TestResolvePiGatewaySecretEnvVar(t *testing.T) { |
| 256 | t.Run("uses first core secret when present", func(t *testing.T) { |
| 257 | profile := universalLLMBackendProfile{coreSecretNames: []string{"CUSTOM_API_KEY", "SECOND"}} |
| 258 | assert.Equal(t, "CUSTOM_API_KEY", resolvePiGatewaySecretEnvVar(profile, UniversalLLMBackendAnthropic)) |
| 259 | }) |
| 260 | |
| 261 | t.Run("falls back to backend defaults when core secrets are empty", func(t *testing.T) { |
| 262 | profile := universalLLMBackendProfile{} |
| 263 | assert.Equal(t, "ANTHROPIC_API_KEY", resolvePiGatewaySecretEnvVar(profile, UniversalLLMBackendAnthropic)) |
| 264 | assert.Equal(t, "CODEX_API_KEY", resolvePiGatewaySecretEnvVar(profile, UniversalLLMBackendCodex)) |
| 265 | assert.Equal(t, "COPILOT_GITHUB_TOKEN", resolvePiGatewaySecretEnvVar(profile, UniversalLLMBackendCopilot)) |
| 266 | }) |
| 267 | } |
| 268 | |
| 269 | func TestPiEngine_GetExecutionSteps_ProviderPrefixCopilot(t *testing.T) { |
| 270 | engine := NewPiEngine() |
nothing calls this directly
no test coverage detected