Skip to content

Commit b795cb6

Browse files
committed
test(docs): follow shared Docker token setup
1 parent 57e5ab7 commit b795cb6

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎docs/plugins/sdk-subpaths.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ title: "Plugin SDK subpaths"
99

1010
The plugin SDK contains narrow public subpaths and repository-only bundled
1111
helpers under `openclaw/plugin-sdk/`. This page catalogs every typed public
12-
subpath and selected private-local entries that clarify the package boundary;
13-
it is not an inventory of every internal runtime helper. Three files define
14-
the boundary:
12+
subpath and labels private-local entries explicitly to clarify the package
13+
boundary; it is not an inventory of every internal runtime helper. Three files
14+
define the boundary:
1515

1616
- `scripts/lib/plugin-sdk-entrypoints.json`: the maintained entrypoint inventory
1717
the build compiles.

‎src/docs/install-cloud-secrets.test.ts‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from "node:path";
44
import { describe, expect, it } from "vitest";
55

66
const INSTALL_DOCS_DIR = path.join(process.cwd(), "docs", "install");
7-
const CLOUD_DOCKER_VM_INSTALL_DOCS = new Set(["gcp.md", "hetzner.md"]);
7+
const DOCKER_VM_RUNTIME_DOC = path.join(INSTALL_DOCS_DIR, "docker-vm-runtime.md");
88
const KNOWN_WEAK_GATEWAY_TOKEN_PLACEHOLDERS = [
99
"change-me-to-a-long-random-token",
1010
"change-me-now",
@@ -34,11 +34,13 @@ describe("cloud install docs", () => {
3434
expect(markdown, docName).not.toContain(`OPENCLAW_GATEWAY_PASSWORD=${password}`);
3535
}
3636
expect(markdown, docName).not.toMatch(/^ {4}GOG_KEYRING_PASSWORD=change-me-now$/m);
37-
if (CLOUD_DOCKER_VM_INSTALL_DOCS.has(docName)) {
38-
expect(markdown, docName).toMatch(/^ {4}OPENCLAW_GATEWAY_TOKEN=[ \t]*\r?$/m);
39-
expect(markdown, docName).toMatch(/^ {4}GOG_KEYRING_PASSWORD=[ \t]*\r?$/m);
40-
expect(markdown, docName).toContain("openssl rand -hex 32");
41-
}
4237
}
38+
39+
// The shared Docker VM runtime owns token setup for GCP and Hetzner. Its
40+
// maintained setup script must generate the token rather than document a
41+
// copy-paste value in either provider guide.
42+
const dockerVmRuntime = await fs.readFile(DOCKER_VM_RUNTIME_DOC, "utf8");
43+
expect(dockerVmRuntime).toContain("generates a Gateway token");
44+
expect(dockerVmRuntime).toContain("synchronizes `.env`");
4345
});
4446
});

0 commit comments

Comments
 (0)