Skip to content

Commit 2a48a26

Browse files
committed
fix(e2e): reject empty Docker lane plans
1 parent e0e3012 commit 2a48a26

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

‎scripts/test-docker-all.mjs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,19 @@ async function main() {
12681268
upgradeSurvivorBaselines: process.env.OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPECS,
12691269
upgradeSurvivorScenarios: process.env.OPENCLAW_UPGRADE_SURVIVOR_SCENARIOS,
12701270
});
1271+
if (scheduledLanes.length === 0) {
1272+
throw new Error(
1273+
[
1274+
"resolved zero Docker lanes",
1275+
`profile=${profile}`,
1276+
`releaseChunk=${releaseChunk || "<none>"}`,
1277+
`releaseProfile=${releaseProfile}`,
1278+
`liveMode=${liveMode}`,
1279+
`includeOpenWebUI=${includeOpenWebUI ? "1" : "0"}`,
1280+
`selectedLanes=${selectedLaneNames.length > 0 ? selectedLaneNames.join(",") : "<none>"}`,
1281+
].join("; "),
1282+
);
1283+
}
12711284

12721285
if (planJson) {
12731286
process.stdout.write(`${JSON.stringify(plan, null, 2)}\n`);

‎test/scripts/docker-all-scheduler.test.ts‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,36 @@ describe("scripts/test-docker-all scheduler", () => {
147147
}
148148
});
149149

150+
it("rejects release-path configs that schedule zero Docker lanes", () => {
151+
const logDir = mkdtempSync(`${tmpdir()}/openclaw-docker-all-`);
152+
try {
153+
const result = spawnSync(process.execPath, ["scripts/test-docker-all.mjs"], {
154+
cwd: process.cwd(),
155+
encoding: "utf8",
156+
env: {
157+
...process.env,
158+
OPENCLAW_DOCKER_ALL_CHUNK: "openwebui",
159+
OPENCLAW_DOCKER_ALL_DRY_RUN: "1",
160+
OPENCLAW_DOCKER_ALL_INCLUDE_OPENWEBUI: "0",
161+
OPENCLAW_DOCKER_ALL_LOG_DIR: logDir,
162+
OPENCLAW_DOCKER_ALL_PREFLIGHT: "0",
163+
OPENCLAW_DOCKER_ALL_PROFILE: "release-path",
164+
OPENCLAW_DOCKER_ALL_TIMINGS: "0",
165+
},
166+
});
167+
168+
expect(result.status).toBe(1);
169+
expect(result.stdout).not.toContain("Dry run complete");
170+
expect(result.stderr).toContain("resolved zero Docker lanes");
171+
expect(result.stderr).toContain("profile=release-path");
172+
expect(result.stderr).toContain("releaseChunk=openwebui");
173+
expect(result.stderr).toContain("includeOpenWebUI=0");
174+
expect(result.stderr).not.toContain("at ");
175+
} finally {
176+
rmSync(logDir, { force: true, recursive: true });
177+
}
178+
});
179+
150180
it("allows an overweight lane to start alone under low parallelism", () => {
151181
expect(
152182
canStartSchedulerLane(

0 commit comments

Comments
 (0)