(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestNormalizeCatalogProvider(t *testing.T) { |
| 24 | tests := []struct { |
| 25 | input string |
| 26 | want string |
| 27 | }{ |
| 28 | {"github", "github-copilot"}, |
| 29 | {"copilot", "github-copilot"}, |
| 30 | {"github_models", "github-copilot"}, |
| 31 | {"GITHUB_MODELS", "github-copilot"}, |
| 32 | {"anthropic", "anthropic"}, |
| 33 | {"openai", "openai"}, |
| 34 | {"", ""}, |
| 35 | } |
| 36 | for _, tt := range tests { |
| 37 | name := tt.input |
| 38 | if name == "" { |
| 39 | name = "<empty>" |
| 40 | } |
| 41 | t.Run(name, func(t *testing.T) { |
| 42 | got := normalizeCatalogProvider(tt.input) |
| 43 | assert.Equal(t, tt.want, got) |
| 44 | }) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestComputeModelInferenceAICGitHubModels(t *testing.T) { |
| 49 | // provider="github_models" is written by the AWF proxy for Copilot engine runs; |
nothing calls this directly
no test coverage detected