MCPcopy Create free account
hub / github.com/github/gh-aw / TestNormalizeCatalogProvider

Function TestNormalizeCatalogProvider

pkg/cli/model_costs_test.go:23–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21}
22
23func 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
48func TestComputeModelInferenceAICGitHubModels(t *testing.T) {
49 // provider="github_models" is written by the AWF proxy for Copilot engine runs;

Callers

nothing calls this directly

Calls 2

normalizeCatalogProviderFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected