From d7f4c8b4372312f41ddd8a1bd80c083a68d8fe18 Mon Sep 17 00:00:00 2001 From: Shakker Date: Fri, 8 May 2026 21:17:37 +0100 Subject: [PATCH] test: tighten docker e2e lane assertion --- test/scripts/docker-e2e-plan.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/scripts/docker-e2e-plan.test.ts b/test/scripts/docker-e2e-plan.test.ts index 6b44bbc3802..a7454ebdedd 100644 --- a/test/scripts/docker-e2e-plan.test.ts +++ b/test/scripts/docker-e2e-plan.test.ts @@ -30,6 +30,15 @@ function planFor( }).plan; } +function requireFirstLane(plan: ReturnType) { + const [lane] = plan.lanes; + expect(lane).toBeDefined(); + if (!lane) { + throw new Error("Expected at least one Docker E2E lane"); + } + return lane; +} + describe("scripts/lib/docker-e2e-plan", () => { it("plans the full release path against package-backed e2e images", () => { const plan = planFor({ @@ -342,7 +351,7 @@ describe("scripts/lib/docker-e2e-plan", () => { ), }), ]); - expect(plan.lanes[0]?.command).toContain( + expect(requireFirstLane(plan).command).toContain( 'OPENCLAW_UPGRADE_SURVIVOR_ARTIFACT_DIR="$PWD/.artifacts/upgrade-survivor/published-upgrade-survivor-2026.4.29"', ); });