fix(test): copy cleanup smoke prepare hook

This commit is contained in:
Vincent Koc
2026-05-24 16:46:48 +02:00
parent 675158c896
commit dbc08f64c1
2 changed files with 18 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ const BUNDLED_PLUGIN_INSTALL_UNINSTALL_PROBE_PATH =
"scripts/e2e/lib/bundled-plugin-install-uninstall/probe.mjs";
const BUNDLED_PLUGIN_INSTALL_UNINSTALL_RUNTIME_SMOKE_PATH =
"scripts/e2e/lib/bundled-plugin-install-uninstall/runtime-smoke.mjs";
const CLEANUP_SMOKE_DOCKERFILE_PATH = "scripts/docker/cleanup-smoke/Dockerfile";
const PLUGINS_DOCKER_E2E_PATH = "scripts/e2e/plugins-docker.sh";
const PLUGINS_DOCKER_SWEEP_PATH = "scripts/e2e/lib/plugins/sweep.sh";
const PLUGINS_DOCKER_MARKETPLACE_PATH = "scripts/e2e/lib/plugins/marketplace.sh";
@@ -107,6 +108,22 @@ describe("docker build helper", () => {
expect(dockerfile).toContain("procps");
});
it("copies root lifecycle scripts before cleanup-smoke installs dependencies", () => {
const dockerfile = readFileSync(CLEANUP_SMOKE_DOCKERFILE_PATH, "utf8");
const installIndex = dockerfile.indexOf("pnpm install --frozen-lockfile");
for (const script of [
"scripts/preinstall-package-manager-warning.mjs",
"scripts/postinstall-bundled-plugins.mjs",
"scripts/prepare-git-hooks.mjs",
]) {
const copyIndex = dockerfile.indexOf(script);
expect(copyIndex, script).toBeGreaterThanOrEqual(0);
expect(copyIndex, script).toBeLessThan(installIndex);
}
});
it("preserves pnpm lookup paths for scheduled Docker child lanes", () => {
const scheduler = readFileSync(DOCKER_ALL_SCHEDULER_PATH, "utf8");