mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(test): gate long-context live shard by opt-in (#120798)
This commit is contained in:
committed by
GitHub
parent
af9b872604
commit
a26959b927
@@ -42,6 +42,7 @@ const OPTIONAL_LIVE_SHARD_FILE_ENVS = new Map([
|
||||
["src/gateway/gateway-cli-backend.live.test.ts", ["OPENCLAW_LIVE_CLI_BACKEND"]],
|
||||
["src/gateway/gateway-codex-bind.live.test.ts", ["OPENCLAW_LIVE_CODEX_BIND"]],
|
||||
["src/gateway/gateway-codex-harness.live.test.ts", ["OPENCLAW_LIVE_CODEX_HARNESS"]],
|
||||
["src/gateway/gateway-openai-long-context.live.test.ts", ["OPENCLAW_LIVE_OPENAI_LONG_CONTEXT"]],
|
||||
["src/gateway/gateway-trajectory-export.live.test.ts", ["OPENCLAW_LIVE_CODEX_HARNESS"]],
|
||||
["src/infra/push-apns-http2.live.test.ts", ["OPENCLAW_LIVE_APNS_REACHABILITY"]],
|
||||
["test/image-generation.infer-cli.live.test.ts", ["OPENCLAW_LIVE_INFER_CLI_TEST"]],
|
||||
|
||||
@@ -394,6 +394,38 @@ describe("scripts/test-live-shard", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("allows the OpenAI long-context live file to be skipped until its env is enabled", () => {
|
||||
const profilesFile = "src/gateway/gateway-models.profiles.live.test.ts";
|
||||
const longContextFile = "src/gateway/gateway-openai-long-context.live.test.ts";
|
||||
const payload = {
|
||||
numPassedTests: 1,
|
||||
numTotalTests: 2,
|
||||
testResults: [
|
||||
{
|
||||
name: path.join(process.cwd(), profilesFile),
|
||||
assertionResults: [{ status: "passed" }],
|
||||
},
|
||||
{
|
||||
name: path.join(process.cwd(), longContextFile),
|
||||
assertionResults: [{ status: "skipped" }],
|
||||
},
|
||||
],
|
||||
};
|
||||
const expectedFiles = [profilesFile, longContextFile];
|
||||
|
||||
expect(validateLiveShardReportPayload(payload, expectedFiles, process.cwd(), {})).toEqual({
|
||||
ok: true,
|
||||
});
|
||||
expect(
|
||||
validateLiveShardReportPayload(payload, expectedFiles, process.cwd(), {
|
||||
OPENCLAW_LIVE_OPENAI_LONG_CONTEXT: "1",
|
||||
}),
|
||||
).toEqual({
|
||||
ok: false,
|
||||
reason: `Vitest report selected live test files had no passing assertions: ${longContextFile}`,
|
||||
});
|
||||
});
|
||||
|
||||
it("allows the experience review live file to be skipped until its env is enabled", () => {
|
||||
const reviewFile = "src/skills/workshop/experience-review.live.test.ts";
|
||||
const payload = {
|
||||
|
||||
Reference in New Issue
Block a user