chore(docker): execute Compose and package artifact proofs (#101045)

* test(docker): prove Compose and package artifacts

* test(docker): use bounded container cleanup

* test(docker): bound package proof launch

* test(qa): keep Docker artifact proofs release-only

* test(docker): simplify artifact proof names

* test(docker): satisfy identity writer lint
This commit is contained in:
Dallin Romney
2026-07-06 13:05:34 -07:00
committed by GitHub
parent 2f7299eaa5
commit 66b4dcf184
14 changed files with 780 additions and 56 deletions
+22
View File
@@ -20,6 +20,8 @@ const DOCKER_ALL_SCHEDULER_PATH = "scripts/test-docker-all.mjs";
const DOCKER_E2E_PACKAGE_HELPER_PATH = "scripts/lib/docker-e2e-package.sh";
const DOCKER_E2E_IMAGE_HELPER_PATH = "scripts/lib/docker-e2e-image.sh";
const DOCKER_E2E_SCENARIOS_PATH = "scripts/lib/docker-e2e-scenarios.mjs";
const COMPOSE_SETUP_E2E_PATH = "scripts/e2e/compose-setup.sh";
const DOCKER_PACKAGE_INSTALL_E2E_PATH = "scripts/e2e/docker-package-install.sh";
const INSTALL_E2E_RUNNER_PATH = "scripts/docker/install-sh-e2e/run.sh";
const CLEANUP_DOCKER_SMOKE_PATH = "scripts/test-cleanup-docker.sh";
const INSTALL_E2E_DOCKER_SMOKE_PATH = "scripts/test-install-sh-e2e-docker.sh";
@@ -3769,6 +3771,26 @@ output="$(cat "$sampler_log")"
expect(runner, path).not.toMatch(/(^|\n)\s*docker rm -f "\$CONTAINER_NAME"/u);
expect(runner, path).toContain('docker_e2e_docker_cmd rm -f "$CONTAINER_NAME"');
}
const composeRunner = readFileSync(COMPOSE_SETUP_E2E_PATH, "utf8");
expect(composeRunner).not.toMatch(/(^|\n)\s*docker rm -f "\$CLI_NAME"/u);
expect(composeRunner).toContain('docker_e2e_docker_cmd rm -f "$CLI_NAME"');
const packageRunner = readFileSync(DOCKER_PACKAGE_INSTALL_E2E_PATH, "utf8");
expect(packageRunner).not.toMatch(/(^|\n)\s*docker rm -f "\$CONTAINER_NAME"/u);
expect(packageRunner).toContain('docker_e2e_docker_cmd rm -f "$CONTAINER_NAME"');
expect(packageRunner).toContain(
'DOCKER_RUN_TIMEOUT="${OPENCLAW_DOCKER_PACKAGE_INSTALL_RUN_TIMEOUT:-120s}"',
);
expect(packageRunner).toContain(
'DOCKER_COMMAND_TIMEOUT="$DOCKER_RUN_TIMEOUT" docker_e2e_docker_run_cmd run -d',
);
expect(packageRunner).not.toMatch(/(^|\n)docker run -d/u);
for (const runner of [composeRunner, packageRunner]) {
expect(runner).toContain(
'node --import tsx "$ROOT_DIR/scripts/e2e/lib/docker-artifact-proof/write-identities.ts"',
);
}
});
it("routes the gateway network client through the timeout-aware run helper", () => {
+36
View File
@@ -97,6 +97,42 @@ function bundledPluginSweepLane(index: number): ReturnType<typeof summarizeLane>
}
describe("scripts/lib/docker-e2e-plan", () => {
it("plans package-backed Compose and package artifact proofs", () => {
const plan = planFor({
selectedLaneNames: ["compose-setup", "docker-package-install"],
});
expect(plan.lanes.map(summarizeLane)).toEqual([
{
command: "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:compose-setup",
imageKind: "functional",
live: false,
name: "compose-setup",
resources: ["docker", "service"],
stateScenario: "empty",
timeoutMs: 1_200_000,
weight: 3,
},
{
command: "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:package-install",
imageKind: "bare",
live: false,
name: "docker-package-install",
resources: ["docker", "npm"],
stateScenario: "empty",
timeoutMs: 1_200_000,
weight: 3,
},
]);
expect(plan.needs).toEqual({
bareImage: true,
e2eImage: true,
functionalImage: true,
liveImage: false,
package: true,
});
});
it("plans the full release path against package-backed e2e images", () => {
const plan = planFor({
includeOpenWebUI: false,