Configure hotspot credentials from dashboard

This commit is contained in:
2026-07-31 20:41:16 +02:00
parent e52d2690ee
commit d1239d66af
19 changed files with 443 additions and 23 deletions
+11 -1
View File
@@ -20,7 +20,8 @@ function testConfig(): AppConfig {
network: {
enabled: false,
statusPath: `/tmp/pi-car-companion-test-${process.pid}-missing-network-status.json`,
commandPath: `/tmp/pi-car-companion-test-${process.pid}-network-command.json`
commandPath: `/tmp/pi-car-companion-test-${process.pid}-network-command.json`,
configurationRequestPath: `/tmp/pi-car-companion-test-${process.pid}-network-configuration.json`
},
adb: { enabled: false, executable: "adb", serial: null, timeoutMs: 3_000 }
};
@@ -210,6 +211,15 @@ describe("authentication boundary", () => {
payload: { action: "retry-upstream" }
});
expect(action.statusCode).toBe(503);
const invalidConfiguration = await app.inject({
method: "POST",
url: "/api/network/configuration",
headers: { ...mutationHeaders(token), cookie },
payload: { ssid: "bad/name", password: "short" }
});
expect(invalidConfiguration.statusCode).toBe(400);
expect(invalidConfiguration.json()).toMatchObject({ error: { code: "INVALID_HOTSPOT_CONFIGURATION" } });
});
it("exposes only allowlisted jobs and authenticated run history", async () => {