Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
test(local-installation): run every native database test as a normal user
shoudi zheng721c85ceb0d5
diff --git a/packages/local-installation/src/native-database.test.ts b/packages/local-installation/src/native-database.test.tsindex 4bcde1a1..492e4a45 100644--- a/packages/local-installation/src/native-database.test.ts+++ b/packages/local-installation/src/native-database.test.ts@@ -39,6 +39,10 @@ import type { Instance } from "./instance.js";const run = vi.mocked(runProcess);const platform = Object.getOwnPropertyDescriptor(process, "platform")!;const getuid = Object.getOwnPropertyDescriptor(process, "getuid")!;+// The root guard refuses initdb, and CI containers often run as root.+beforeEach(() => {+ Object.defineProperty(process, "getuid", { ...getuid, value: () => 1000 });+});afterEach(() => {Object.defineProperty(process, "platform", platform);Object.defineProperty(process, "getuid", getuid);@@ -142,10 +146,6 @@ describe("prepareNativeDatabase on Windows", () => {});describe("prepareNativeDatabase initdb", () => {- // The root guard refuses initdb, and CI containers often run as root.- beforeEach(() => {- Object.defineProperty(process, "getuid", { ...getuid, value: () => 1000 });- });const data = path.join(instance.root, "native/postgres-data");const pending = `${data}.partial`;const pgdata = () =>