test: cover v2 provider model routes

This commit is contained in:
Dax Raad
2026-05-12 02:29:30 -04:00
parent 6e8f113ccb
commit 284d0da8b9
2 changed files with 7 additions and 1 deletions
@@ -26,7 +26,7 @@ export function callAuthProbe(scenario: ActiveScenario, credentials: "missing" |
toAuthProbeRequest(scenario, credentials, controller.signal),
),
).then((response) => capture(response, scenario.capture)),
Bun.sleep(1_000).then(() => {
Bun.sleep(5_000).then(() => {
controller.abort("auth probe timed out")
return {
status: 0,
@@ -593,6 +593,12 @@ const scenarios: Scenario[] = [
check(auth.test === undefined, "auth remove should delete provider from isolated auth file")
}),
),
http.protected.get("/api/model", "v2.model.list").json(200, array, "none"),
http.protected.get("/api/provider", "v2.provider.list").json(200, array, "none"),
http.protected
.get("/api/provider/{providerID}", "v2.provider.get")
.at((ctx) => ({ path: route("/api/provider/{providerID}", { providerID: "opencode" }), headers: ctx.headers() }))
.json(200, object, "none"),
http.protected
.get("/api/session", "v2.session.list")
.at((ctx) => ({ path: "/api/session?roots=true", headers: ctx.headers() }))