mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:10:49 +00:00
test: tolerate unavailable release agent turn
This commit is contained in:
@@ -56,6 +56,7 @@ import {
|
||||
shouldStopManagedGatewayBeforeManualFallback,
|
||||
shouldRunMainChannelDevUpdate,
|
||||
shouldRetryCrossOsAgentTurnError,
|
||||
shouldSkipOptionalCrossOsAgentTurnError,
|
||||
shouldUseManagedGatewayForInstallerRuntime,
|
||||
shouldUseManagedGatewayService,
|
||||
verifyDevUpdateStatus,
|
||||
@@ -124,6 +125,47 @@ describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("skips optional live agent turns only for model availability failures", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "openclaw-cross-os-agent-skip-"));
|
||||
try {
|
||||
const logPath = join(dir, "agent.log");
|
||||
writeFileSync(
|
||||
logPath,
|
||||
JSON.stringify({
|
||||
status: "timeout",
|
||||
result: {
|
||||
payloads: [
|
||||
{
|
||||
text: "Request timed out before a response was generated.",
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
expect(
|
||||
shouldSkipOptionalCrossOsAgentTurnError(
|
||||
new Error("Agent output did not contain the expected OK marker."),
|
||||
logPath,
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
shouldSkipOptionalCrossOsAgentTurnError(
|
||||
new Error("document-extract: failed to install bundled runtime deps"),
|
||||
logPath,
|
||||
),
|
||||
).toBe(false);
|
||||
expect(
|
||||
shouldSkipOptionalCrossOsAgentTurnError(
|
||||
new Error("Agent output did not contain the expected OK marker."),
|
||||
join(dir, "missing.log"),
|
||||
),
|
||||
).toBe(false);
|
||||
} finally {
|
||||
rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("allows cross-OS provider smoke models to use faster CI overrides", () => {
|
||||
expect(
|
||||
resolveProviderConfig("openai", {
|
||||
|
||||
Reference in New Issue
Block a user