@@ -13,6 +13,7 @@ const INSTALL_E2E_RUNNER_PATH = "scripts/docker/install-sh-e2e/run.sh";
|
13 | 13 | const DOCKER_SETUP_PATH = "scripts/docker/setup.sh"; |
14 | 14 | const HOST_TIMEOUT_PATH = "scripts/lib/host-timeout.sh"; |
15 | 15 | const PODMAN_SETUP_PATH = "scripts/podman/setup.sh"; |
| 16 | +const PODMAN_QUADLET_TEMPLATE_PATH = "scripts/podman/openclaw.container.in"; |
16 | 17 | const PODMAN_RUN_PATH = "scripts/run-openclaw-podman.sh"; |
17 | 18 | const SMOKE_RUNNER_PATH = "scripts/docker/install-sh-smoke/run.sh"; |
18 | 19 | const NONROOT_RUNNER_PATH = "scripts/docker/install-sh-nonroot/run.sh"; |
@@ -431,6 +432,35 @@ describe("test-install-sh-docker", () => {
|
431 | 432 | expect(podmanSetup).not.toContain("OPENCLAW_DOCKER_PIP_PACKAGES"); |
432 | 433 | }); |
433 | 434 | |
| 435 | +it("keeps the Podman Quadlet template aligned with setup substitutions", () => { |
| 436 | +const setupScript = readFileSync(PODMAN_SETUP_PATH, "utf8"); |
| 437 | +const template = readFileSync(PODMAN_QUADLET_TEMPLATE_PATH, "utf8"); |
| 438 | + |
| 439 | +expect(setupScript).toContain( |
| 440 | +'QUADLET_TEMPLATE="$REPO_PATH/scripts/podman/openclaw.container.in"', |
| 441 | +); |
| 442 | +for (const placeholder of [ |
| 443 | +"OPENCLAW_CONFIG_DIR", |
| 444 | +"OPENCLAW_WORKSPACE_DIR", |
| 445 | +"IMAGE_NAME", |
| 446 | +"CONTAINER_NAME", |
| 447 | +]) { |
| 448 | +expect(setupScript).toContain(`{{${placeholder}}}`); |
| 449 | +expect(template).toContain(`{{${placeholder}}}`); |
| 450 | +} |
| 451 | + |
| 452 | +expect(template).toContain("UserNS=keep-id"); |
| 453 | +expect(template).toContain("User=%U:%G"); |
| 454 | +expect(template).toContain("Volume={{OPENCLAW_CONFIG_DIR}}:/home/node/.openclaw:Z"); |
| 455 | +expect(template).toContain( |
| 456 | +"Volume={{OPENCLAW_WORKSPACE_DIR}}:/home/node/.openclaw/workspace:Z", |
| 457 | +); |
| 458 | +expect(template).toContain("EnvironmentFile={{OPENCLAW_CONFIG_DIR}}/.env"); |
| 459 | +expect(template).toContain("PublishPort=127.0.0.1:18789:18789"); |
| 460 | +expect(template).toContain("Exec=node dist/index.js gateway --bind lan --port 18789"); |
| 461 | +expect(template).not.toContain("/home/admin"); |
| 462 | +}); |
| 463 | + |
434 | 464 | it("allows repository branch history and release tags for secret-backed Docker release checks", () => { |
435 | 465 | const workflow = readFileSync(LIVE_E2E_WORKFLOW_PATH, "utf8"); |
436 | 466 | |
|