(t *testing.T)
| 2928 | } |
| 2929 | |
| 2930 | func TestChatProviderAPIKeysFromDeploymentValues(t *testing.T) { |
| 2931 | t.Parallel() |
| 2932 | |
| 2933 | t.Run("DoesNotReuseBridgeConfig", func(t *testing.T) { |
| 2934 | t.Parallel() |
| 2935 | |
| 2936 | values := chatDeploymentValues(t) |
| 2937 | values.AI.BridgeConfig.LegacyOpenAI.Key = serpent.String("deployment-openai-key") |
| 2938 | values.AI.BridgeConfig.LegacyAnthropic.Key = serpent.String("deployment-anthropic-key") |
| 2939 | values.AI.BridgeConfig.LegacyOpenAI.BaseURL = serpent.String("https://custom-openai.example.com") |
| 2940 | |
| 2941 | keys := coderd.ChatProviderAPIKeysFromDeploymentValues(values) |
| 2942 | require.Equal(t, chatprovider.ProviderAPIKeys{}, keys) |
| 2943 | }) |
| 2944 | |
| 2945 | t.Run("NilDeploymentValues", func(t *testing.T) { |
| 2946 | t.Parallel() |
| 2947 | |
| 2948 | keys := coderd.ChatProviderAPIKeysFromDeploymentValues(nil) |
| 2949 | require.Equal(t, chatprovider.ProviderAPIKeys{}, keys) |
| 2950 | }) |
| 2951 | } |
| 2952 | |
| 2953 | func TestUserChatProviderConfigs(t *testing.T) { |
| 2954 | t.Parallel() |
nothing calls this directly
no test coverage detected