mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-28 05:06:23 +00:00
fix(test): copy cleanup smoke prepare hook
This commit is contained in:
@@ -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