Skip to content

Commit c563c6f

Browse files
committed
test: fold release upgrade docker lanes into qa
1 parent 18f0eea commit c563c6f

7 files changed

Lines changed: 255 additions & 0 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title: Docker release upgrade user journey
2+
3+
scenario:
4+
id: docker-release-upgrade-user-journey
5+
surface: docker-podman-hosting
6+
category: docker-podman-hosting.image-release-and-validation
7+
coverage:
8+
primary:
9+
- docker.release-workflow
10+
- docker.release-path-install
11+
objective: Verify a published baseline can be configured, upgraded to the candidate tarball, and still complete the core release journey.
12+
successCriteria:
13+
- A published baseline installs and is configured with mock provider, plugin, and ClickClack channel state.
14+
- The candidate package replaces the baseline package.
15+
- The upgraded install still passes agent, plugin CLI, channel status, outbound message, Gateway, and inbound reply checks.
16+
docsRefs:
17+
- docs/help/testing.md
18+
- docs/help/testing-updates-plugins.md
19+
- docs/concepts/qa-e2e-automation.md
20+
codeRefs:
21+
- scripts/e2e/release-upgrade-user-journey-docker.sh
22+
- scripts/e2e/lib/release-upgrade-user-journey/scenario.sh
23+
- scripts/e2e/lib/release-user-journey/assertions.mjs
24+
execution:
25+
kind: script
26+
path: scripts/qa/docker-e2e-lane.ts
27+
summary: Runs the existing release-upgrade-user-journey Docker E2E lane and records QA Lab evidence for release-path upgrade coverage.
28+
args:
29+
- --lane
30+
- release-upgrade-user-journey
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
title: Docker release user journey
2+
3+
scenario:
4+
id: docker-release-user-journey
5+
surface: docker-podman-hosting
6+
category: docker-podman-hosting.image-release-and-validation
7+
coverage:
8+
primary:
9+
- docker.release-path-install
10+
objective: Verify the package-installed Docker release journey from clean install through agent, plugin, channel, Gateway restart, and doctor checks.
11+
successCriteria:
12+
- The packed OpenClaw tarball installs globally in a clean Docker home.
13+
- Non-interactive onboarding configures the loopback Gateway and mock model provider.
14+
- A package-installed agent turn, external plugin install/uninstall, ClickClack outbound/inbound messaging, Gateway restart, and doctor repair all pass.
15+
docsRefs:
16+
- docs/help/testing.md
17+
- docs/help/testing-updates-plugins.md
18+
- docs/concepts/qa-e2e-automation.md
19+
codeRefs:
20+
- scripts/e2e/release-user-journey-docker.sh
21+
- scripts/e2e/lib/release-user-journey/scenario.sh
22+
- scripts/e2e/lib/release-user-journey/assertions.mjs
23+
execution:
24+
kind: script
25+
path: scripts/qa/docker-e2e-lane.ts
26+
summary: Runs the existing release-user-journey Docker E2E lane and records QA Lab evidence for release-path install coverage.
27+
args:
28+
- --lane
29+
- release-user-journey
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title: Docker update channel switch
2+
3+
scenario:
4+
id: docker-update-channel-switch
5+
surface: cli-install-update-onboard-doctor
6+
category: cli-install-update-onboard-doctor.updates-and-upgrades
7+
coverage:
8+
primary:
9+
- cli.install-kind-switching
10+
- cli.update-status-and-rpc
11+
secondary:
12+
- cli.update-channels
13+
objective: Verify package-to-git and git-to-package update switching plus machine-readable update status in Docker.
14+
successCriteria:
15+
- The package install updates to a package-derived git dev fixture.
16+
- The git install updates back to the package tarball.
17+
- "`openclaw update status --json` reports the expected git and package status after each switch."
18+
docsRefs:
19+
- docs/cli/update.md
20+
- docs/install/updating.md
21+
- docs/help/testing-updates-plugins.md
22+
codeRefs:
23+
- scripts/e2e/update-channel-switch-docker.sh
24+
- scripts/e2e/lib/update-channel-switch/assertions.mjs
25+
execution:
26+
kind: script
27+
path: scripts/qa/docker-e2e-lane.ts
28+
summary: Runs the existing update-channel-switch Docker E2E lane and records QA Lab evidence for install-kind switching and update status coverage.
29+
args:
30+
- --lane
31+
- update-channel-switch
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title: Docker update migration
2+
3+
scenario:
4+
id: docker-update-migration
5+
surface: cli-install-update-onboard-doctor
6+
category: cli-install-update-onboard-doctor.updates-and-upgrades
7+
coverage:
8+
primary:
9+
- cli.plugin-convergence
10+
secondary:
11+
- cli.update-status-and-rpc
12+
objective: Verify published baseline plugin dependency debris is cleaned by the candidate update and post-update doctor flow.
13+
successCriteria:
14+
- A published baseline is configured with the plugin-dependency cleanup scenario.
15+
- Legacy plugin dependency debris is present before candidate repair.
16+
- Candidate update plus doctor cleans the legacy dependency roots and the final Gateway/status probes pass.
17+
docsRefs:
18+
- docs/cli/update.md
19+
- docs/help/testing-updates-plugins.md
20+
- docs/reference/test.md
21+
codeRefs:
22+
- scripts/e2e/upgrade-survivor-docker.sh
23+
- scripts/e2e/lib/upgrade-survivor/run.sh
24+
- src/cli/update-cli/post-core-plugin-convergence.ts
25+
execution:
26+
kind: script
27+
path: scripts/qa/docker-e2e-lane.ts
28+
summary: Runs the existing update-migration Docker E2E lane and records QA Lab evidence for plugin convergence coverage.
29+
args:
30+
- --lane
31+
- update-migration
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title: Docker update managed restart auth
2+
3+
scenario:
4+
id: docker-update-restart-auth
5+
surface: cli-install-update-onboard-doctor
6+
category: cli-install-update-onboard-doctor.updates-and-upgrades
7+
coverage:
8+
primary:
9+
- cli.managed-gateway-restart
10+
secondary:
11+
- cli.update-status-and-rpc
12+
objective: Verify update-owned Gateway restart works when the caller lacks service-owned auth environment.
13+
successCriteria:
14+
- The lane starts a managed token-auth Gateway.
15+
- "`openclaw update --yes --json` runs without inherited caller Gateway auth."
16+
- The update command restarts the Gateway and the normal health, ready, and RPC status probes pass afterward.
17+
docsRefs:
18+
- docs/cli/update.md
19+
- docs/install/updating.md
20+
- docs/help/testing-updates-plugins.md
21+
codeRefs:
22+
- scripts/e2e/upgrade-survivor-docker.sh
23+
- scripts/e2e/lib/upgrade-survivor/run.sh
24+
- scripts/e2e/lib/upgrade-survivor/update-restart-auth.sh
25+
execution:
26+
kind: script
27+
path: scripts/qa/docker-e2e-lane.ts
28+
summary: Runs the existing update-restart-auth Docker E2E lane and records QA Lab evidence for managed Gateway restart coverage.
29+
args:
30+
- --lane
31+
- update-restart-auth
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title: Docker upgrade survivor
2+
3+
scenario:
4+
id: docker-upgrade-survivor
5+
surface: cli-install-update-onboard-doctor
6+
category: cli-install-update-onboard-doctor.updates-and-upgrades
7+
coverage:
8+
primary:
9+
- cli.update-status-and-rpc
10+
secondary:
11+
- docker.release-path-install
12+
objective: Verify dirty existing user state survives package update, doctor repair, Gateway startup, health probes, and RPC status in Docker.
13+
successCriteria:
14+
- The packed candidate installs over seeded existing-user state with agents, channels, plugin allowlists, workspaces, sessions, and stale dependency debris.
15+
- Package update plus non-interactive doctor completes without live provider or channel keys.
16+
- Gateway startup, `/healthz`, `/readyz`, and `gateway status --require-rpc --json` pass within survivor budgets.
17+
docsRefs:
18+
- docs/help/testing.md
19+
- docs/help/testing-updates-plugins.md
20+
- docs/reference/test.md
21+
codeRefs:
22+
- scripts/e2e/upgrade-survivor-docker.sh
23+
- scripts/e2e/lib/upgrade-survivor/run.sh
24+
- scripts/e2e/lib/upgrade-survivor/assertions.mjs
25+
execution:
26+
kind: script
27+
path: scripts/qa/docker-e2e-lane.ts
28+
summary: Runs the existing upgrade-survivor Docker E2E lane and records QA Lab evidence for update status/RPC survival coverage.
29+
args:
30+
- --lane
31+
- upgrade-survivor

scripts/qa/docker-e2e-lane.ts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Runs an existing Docker E2E lane through the QA Lab script scenario contract.
2+
import { spawnSync } from "node:child_process";
3+
4+
type Lane = {
5+
env?: Record<string, string>;
6+
script: string;
7+
};
8+
9+
const lanes: Record<string, Lane> = {
10+
"release-upgrade-user-journey": {
11+
script: "scripts/e2e/release-upgrade-user-journey-docker.sh",
12+
},
13+
"release-user-journey": {
14+
script: "scripts/e2e/release-user-journey-docker.sh",
15+
},
16+
"update-channel-switch": {
17+
script: "scripts/e2e/update-channel-switch-docker.sh",
18+
},
19+
"update-migration": {
20+
env: {
21+
OPENCLAW_UPGRADE_SURVIVOR_PUBLISHED_BASELINE: "1",
22+
OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC:
23+
process.env.OPENCLAW_UPGRADE_SURVIVOR_BASELINE_SPEC ?? "[email protected]",
24+
OPENCLAW_UPGRADE_SURVIVOR_SCENARIO:
25+
process.env.OPENCLAW_UPGRADE_SURVIVOR_SCENARIO ?? "plugin-deps-cleanup",
26+
},
27+
script: "scripts/e2e/upgrade-survivor-docker.sh",
28+
},
29+
"update-restart-auth": {
30+
env: {
31+
OPENCLAW_UPGRADE_SURVIVOR_UPDATE_RESTART_MODE: "auto-auth",
32+
OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT:
33+
process.env.OPENCLAW_UPGRADE_SURVIVOR_DOCKER_RUN_TIMEOUT ?? "1500s",
34+
},
35+
script: "scripts/e2e/upgrade-survivor-docker.sh",
36+
},
37+
"upgrade-survivor": {
38+
script: "scripts/e2e/upgrade-survivor-docker.sh",
39+
},
40+
};
41+
42+
function laneArg(argv: string[]) {
43+
const index = argv.indexOf("--lane");
44+
if (index === -1) {
45+
throw new Error("--lane is required");
46+
}
47+
const lane = argv[index + 1];
48+
if (!lane || lane.startsWith("-")) {
49+
throw new Error("--lane requires a value");
50+
}
51+
return lane;
52+
}
53+
54+
const laneName = laneArg(process.argv.slice(2));
55+
const lane = lanes[laneName];
56+
if (!lane) {
57+
throw new Error(`unknown Docker E2E lane: ${laneName}`);
58+
}
59+
60+
const result = spawnSync("bash", [lane.script], {
61+
env: { ...process.env, ...lane.env },
62+
stdio: "inherit",
63+
});
64+
65+
if (result.error) {
66+
console.error(result.error);
67+
process.exit(1);
68+
}
69+
if (result.signal) {
70+
process.kill(process.pid, result.signal);
71+
}
72+
process.exit(result.status ?? 1);

0 commit comments

Comments
 (0)