mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
* docs: plan linux client issue 709 * fix: complete linux headless lifecycle routing * feat: add linux packaged inspect * test: add linux headless packaged smoke * ci: add linux headless packaged smoke * ci: smoke linux AppImage release artifacts * docs: document linux packaged client status * chore: finalize linux client audit remediation * docs: add linux client publication packet * test: harden linux client smoke coverage * ci: preserve linux smoke audit evidence * refactor: consolidate linux e2e helpers Move pathExists and the desktop/web/daemon app-key array out of linux.spec.ts into linux-helpers.ts, where expectPathInside and linuxUserHome already live. Keeps the spec file focused on tests and the helpers file as the canonical home for shared Linux e2e utilities. * fix: move linux e2e helpers to lib * fix: address linux release review blockers * fix: drop npm dependency from containerized linux build writeAssembledApp() previously called runNpmInstall() which executed `npm install` directly. Inside the containerized build path, electronuserland/builder:base strips npm/npx/corepack, so the inner tools-pack build would fail at the assembled-app install step. Route the install through OD_TOOLS_PACK_PNPM_BIN: buildDockerArgs sets the env to the standalone pnpm binary it bootstraps, and the new resolveProductionInstallCommand helper consumes that env to run `<bin> install --prod --no-lockfile --config.node-linker=hoisted`. Host invocations with no env set keep the prior npm behavior. --config.node-linker=hoisted preserves the flat node_modules layout that electron-builder packs the same way as npm-installed trees. New tests cover the resolver branches and assert the docker-arg-to- resolver chain end-to-end so reviewers can see the container's inner build receives the env that switches its install away from npm. * fix: harden linux container bootstrap * fix: validate desktop marker liveness in headless cleanup cleanup --headless previously skipped on any parseable desktop-root.json, trapping recovery when the AppImage had crashed and left a stale marker. Validate the marker the same way stopPackedLinuxApp does: if the PID is not in the live snapshot list, proceed through cleanup instead of skipping. Extract the validation into validateDesktopAppImageMarker so the stop and cleanup paths share one definition of live and owned. Tests cover both branches: a stale marker drives cleanup to remove the runtime/output roots, while a live marker drives cleanup to skip and preserve them.
24 lines
809 B
TypeScript
24 lines
809 B
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
|
|
import { linuxRemovalStatusMessage } from "../lib/linux-helpers.js";
|
|
|
|
describe("linux e2e helpers", () => {
|
|
it("delegates user-home resolution to node os.homedir", async () => {
|
|
vi.resetModules();
|
|
vi.doMock("node:os", () => ({ homedir: () => "/tmp/open-design-test-home" }));
|
|
|
|
try {
|
|
const { linuxUserHome } = await import("../lib/linux-helpers.js");
|
|
expect(linuxUserHome()).toBe("/tmp/open-design-test-home");
|
|
} finally {
|
|
vi.doUnmock("node:os");
|
|
vi.resetModules();
|
|
}
|
|
});
|
|
|
|
it("surfaces skipped-process-running as a lifecycle cleanup diagnostic", () => {
|
|
expect(linuxRemovalStatusMessage("appImage", "skipped-process-running")).toContain(
|
|
"process remained running before removal",
|
|
);
|
|
});
|
|
});
|