mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
test(agents): align provider-error assertions with friendly copy (#163642)
Fix red main after #163381 changed friendly provider-error copy. Align five expectations with the existing connection and model-not-found formatting owners while preserving required-answer finalization, permanent WebSocket failure, and model-catalog lifecycle assertions. No production changes. Proof: provider-error 19/19 and model-dispatch 3/3 on Node 24.21.0 and Bun 1.4.3; changed-file checks and git diff --check passed; P2 autoreview scoped-clean; exact-head ClawSweeper found no actionable defects.
This commit is contained in:
parent
a324281c67
commit
f8015dfe3f
2 changed files with 6 additions and 4 deletions
|
|
@ -45,7 +45,7 @@ describe("prepared provider errors after settled tools", () => {
|
|||
expect(request.payloadsWithToolMedia).toEqual([
|
||||
expect.objectContaining({
|
||||
isError: true,
|
||||
text: expect.stringContaining("connection refused"),
|
||||
text: expect.stringContaining("Couldn't connect to the AI service."),
|
||||
}),
|
||||
]);
|
||||
expect(resolveSettledTurnFinalizationRequest(request)).toContain(
|
||||
|
|
@ -154,7 +154,9 @@ describe("prepared provider errors after settled tools", () => {
|
|||
expect.objectContaining({
|
||||
isError: true,
|
||||
text: expect.stringContaining(
|
||||
failure === "provider refusal" ? "refused this request" : "connection refused",
|
||||
failure === "provider refusal"
|
||||
? "refused this request"
|
||||
: "Couldn't connect to the AI service.",
|
||||
),
|
||||
}),
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ it("models.list retains executable rows on failed refresh and replaces them afte
|
|||
});
|
||||
await expect(fixture.send("account-a-only", "withdrawn-after-restart")).resolves.toMatchObject({
|
||||
status: "error",
|
||||
error: expect.stringContaining("The selected model is unavailable from the provider"),
|
||||
error: expect.stringContaining("This model was not found."),
|
||||
});
|
||||
expect(fixture.requests).toHaveLength(3);
|
||||
});
|
||||
|
|
@ -500,7 +500,7 @@ it("models.authRefresh revokes old executable rows before discovery and config.p
|
|||
);
|
||||
await expect(fixture.send("account-a-only", "during-replacement")).resolves.toMatchObject({
|
||||
status: "error",
|
||||
error: expect.stringContaining("The selected model is unavailable from the provider"),
|
||||
error: expect.stringContaining("This model was not found."),
|
||||
});
|
||||
expect(fixture.requests).toHaveLength(1);
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue