test: route pure infra tests through boundary lane

This commit is contained in:
Peter Steinberger
2026-04-03 19:53:20 +01:00
parent 7c25af83e4
commit 9215ff0615
3 changed files with 23 additions and 0 deletions

View File

@@ -17,9 +17,16 @@ describe("isUnitConfigTestFile", () => {
),
).toBe(false);
expect(isUnitConfigTestFile("src/infra/matrix-plugin-helper.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/boundary-path.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/git-root.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/home-dir.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/openclaw-exec-env.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/openclaw-root.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/package-json.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/path-env.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/plugin-sdk/facade-runtime.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/plugins/loader.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/infra/stable-node-path.test.ts")).toBe(false);
expect(isUnitConfigTestFile("test/extension-test-boundary.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/agents/pi-embedded-runner.test.ts")).toBe(false);
expect(isUnitConfigTestFile("src/commands/onboard.test.ts")).toBe(false);

View File

@@ -18,6 +18,8 @@ export function createBoundaryVitestConfig(env: Record<string, string | undefine
isolate: false,
runner: "./test/non-isolated-runner.ts",
include: loadBoundaryIncludePatternsFromEnv(env) ?? boundaryTestFiles,
// Keep this lane free of OpenClaw runtime bootstrap so pure infra/boundary
// suites can avoid plugin/channel setup import cost.
setupFiles: [],
},
});

View File

@@ -16,7 +16,14 @@ export const unitTestIncludePatterns = [
];
export const boundaryTestFiles = [
"src/infra/boundary-path.test.ts",
"src/infra/git-root.test.ts",
"src/infra/home-dir.test.ts",
"src/infra/openclaw-exec-env.test.ts",
"src/infra/openclaw-root.test.ts",
"src/infra/package-json.test.ts",
"src/infra/path-env.test.ts",
"src/infra/stable-node-path.test.ts",
"test/extension-plugin-sdk-boundary.test.ts",
"test/extension-test-boundary.test.ts",
"test/plugin-extension-import-boundary.test.ts",
@@ -40,7 +47,14 @@ export const unitTestAdditionalExcludePatterns = [
"src/commands/**",
"src/channels/plugins/contracts/**",
"src/plugins/contracts/**",
"src/infra/boundary-path.test.ts",
"src/infra/git-root.test.ts",
"src/infra/home-dir.test.ts",
"src/infra/openclaw-exec-env.test.ts",
"src/infra/openclaw-root.test.ts",
"src/infra/package-json.test.ts",
"src/infra/path-env.test.ts",
"src/infra/stable-node-path.test.ts",
...bundledPluginDependentUnitTestFiles,
"src/config/doc-baseline.integration.test.ts",
"src/config/schema.base.generated.test.ts",