Configure hotspot credentials from dashboard
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user