fix(auth): harden unified diagnostic execution
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user