fixes
This commit is contained in:
@@ -61,3 +61,15 @@ func TestResolvePlatformOpenAI_viaPlatformService(t *testing.T) {
|
||||
t.Fatalf("source=%q", oi.Source)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPlatformModeLabel(t *testing.T) {
|
||||
if got := platformModeLabel(platformsettings.SourceDB, "https://llm.overloadedbot.org/v1"); got != ModeInternalLabel {
|
||||
t.Fatalf("db remote: %q", got)
|
||||
}
|
||||
if got := platformModeLabel(platformsettings.SourceEnv, "https://api.openai.com/v1"); got != ModeCustomLabel {
|
||||
t.Fatalf("env remote: %q", got)
|
||||
}
|
||||
if got := platformModeLabel(platformsettings.SourceDB, "http://127.0.0.1:18767/v1"); got != ModeCustomLabel {
|
||||
t.Fatalf("mock loopback: %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user