mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
test: cover base_url fallback and cross-field ollama exclusion
This commit is contained in:
@@ -141,3 +141,13 @@ test("nothing anywhere falls back to localhost", () => {
|
||||
"http://localhost:8080",
|
||||
])
|
||||
})
|
||||
|
||||
test("provider base_url fallback is detected", () => {
|
||||
const snake = [{ id: "llamacpp", name: "llama.cpp", options: { base_url: "http://localhost:9090/v1" } }]
|
||||
assert.deepEqual(resolveServerUrls(undefined, snake, {}), ["http://localhost:9090"])
|
||||
})
|
||||
|
||||
test("ollama in id excludes even when name mentions llama", () => {
|
||||
const mixed = [{ id: "ollama-bridge", name: "My llama server", options: { baseURL: "http://localhost:11434" } }]
|
||||
assert.deepEqual(resolveServerUrls(undefined, mixed, {}), ["http://localhost:8080"])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user