Skip to content

Commit 40bebf4

Browse files
committed
test: add test with custom name
1 parent 4027b0c commit 40bebf4

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

internal/integrationtest/apidump_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,34 @@ func TestAPIDump(t *testing.T) {
7979
headers: http.Header{"Authorization": {"Bearer test-copilot-token"}},
8080
expectProviderDir: config.ProviderCopilot,
8181
},
82+
{
83+
name: "copilot_custom_name_chat_completions",
84+
fixture: fixtures.OaiChatSimple,
85+
providerFunc: func(addr, dumpDir string) aibridge.Provider {
86+
return provider.NewCopilot(config.Copilot{
87+
Name: "copilot-business",
88+
BaseURL: addr,
89+
APIDumpDir: dumpDir,
90+
})
91+
},
92+
path: "/copilot-business/chat/completions",
93+
headers: http.Header{"Authorization": {"Bearer test-copilot-token"}},
94+
expectProviderDir: "copilot-business",
95+
},
96+
{
97+
name: "copilot_custom_name_responses",
98+
fixture: fixtures.OaiChatSimple,
99+
providerFunc: func(addr, dumpDir string) aibridge.Provider {
100+
return provider.NewCopilot(config.Copilot{
101+
Name: "copilot-enterprise",
102+
BaseURL: addr,
103+
APIDumpDir: dumpDir,
104+
})
105+
},
106+
path: "/copilot-enterprise/chat/completions",
107+
headers: http.Header{"Authorization": {"Bearer test-copilot-token"}},
108+
expectProviderDir: "copilot-enterprise",
109+
},
82110
}
83111

84112
for _, tc := range cases {

0 commit comments

Comments
 (0)