Add read-only MG4 ADB status collector

This commit is contained in:
2026-07-31 19:17:43 +02:00
parent 4970fda1b5
commit 3e3e0010d6
16 changed files with 411 additions and 20 deletions
+6 -2
View File
@@ -16,7 +16,8 @@ function testConfig(): AppConfig {
cookieSecure: false,
allowedOrigins: new Set(["http://mg4pi.local:8787"]),
updateStatusPath: `/tmp/pi-car-companion-test-${process.pid}-missing-update.json`,
versionFile: `/tmp/pi-car-companion-test-${process.pid}-missing-revision`
versionFile: `/tmp/pi-car-companion-test-${process.pid}-missing-revision`,
adb: { enabled: false, executable: "adb", serial: null, timeoutMs: 3_000 }
};
}
@@ -156,7 +157,10 @@ describe("authentication boundary", () => {
headers: { cookie: `${SESSION_COOKIE}=${sessionCookie?.value ?? ""}` }
});
expect(status.statusCode, status.body).toBe(200);
expect(status.json()).toMatchObject({ service: { state: "healthy" } });
expect(status.json()).toMatchObject({
service: { state: "healthy" },
headUnit: { available: false, state: "disabled" }
});
const update = await app.inject({
method: "POST",