mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-01 08:01:13 +00:00
fix(test): copy cleanup smoke prepare hook
This commit is contained in:
@@ -19,7 +19,7 @@ COPY ui/package.json ./ui/package.json
|
||||
COPY packages ./packages
|
||||
COPY extensions ./extensions
|
||||
COPY patches ./patches
|
||||
COPY scripts/postinstall-bundled-plugins.mjs scripts/preinstall-package-manager-warning.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/
|
||||
COPY scripts/postinstall-bundled-plugins.mjs scripts/preinstall-package-manager-warning.mjs scripts/prepare-git-hooks.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/
|
||||
COPY scripts/lib/package-dist-imports.mjs ./scripts/lib/package-dist-imports.mjs
|
||||
RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||
corepack enable \
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user