fix(auth): harden unified diagnostic execution

This commit is contained in:
2026-08-17 17:25:26 +02:00
parent 30ee9433dc
commit ef244ab56d
18 changed files with 670 additions and 68 deletions
+7
View File
@@ -47,6 +47,13 @@ test("loadConfig accepts container listening and runtime paths", () => {
});
});
test("loadConfig accepts only an absolute mounted Pi authentication source", () => {
expect(loadConfig({ THT_PI_AUTH_FILE: "/home/thoth/.pi/agent/auth.json" }).piAuthFile)
.toBe("/home/thoth/.pi/agent/auth.json");
expect(() => loadConfig({ THT_PI_AUTH_FILE: "relative/auth.json" }))
.toThrow("Pi authentication source configuration is invalid");
});
test("loadConfig keeps local development defaults", () => {
expect(loadConfig({})).toMatchObject({
host: "127.0.0.1",