Add tabbed settings and system shell
This commit is contained in:
@@ -58,6 +58,32 @@ describe("system update status", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("reports a check-only result when a newer revision is available", async () => {
|
||||
const directory = await mkdtemp(join(tmpdir(), "pi-car-update-test-"));
|
||||
temporaryDirectories.push(directory);
|
||||
const statusPath = join(directory, "status.json");
|
||||
const versionPath = join(directory, "REVISION");
|
||||
await writeFile(
|
||||
statusPath,
|
||||
JSON.stringify({
|
||||
state: "available",
|
||||
message: "A newer release is available.",
|
||||
fromRevision: "a".repeat(40),
|
||||
toRevision: "b".repeat(40),
|
||||
updatedAt: "2026-07-31T18:00:00.000Z"
|
||||
})
|
||||
);
|
||||
await writeFile(versionPath, `${"a".repeat(40)}\n`);
|
||||
|
||||
await expect(readUpdateStatus(config(statusPath, versionPath))).resolves.toMatchObject({
|
||||
state: "available",
|
||||
fromRevision: "a".repeat(40),
|
||||
toRevision: "b".repeat(40),
|
||||
installedRevision: "a".repeat(40),
|
||||
supported: true
|
||||
});
|
||||
});
|
||||
|
||||
it("treats missing or malformed status files as unsupported", async () => {
|
||||
const directory = await mkdtemp(join(tmpdir(), "pi-car-update-test-"));
|
||||
temporaryDirectories.push(directory);
|
||||
|
||||
Reference in New Issue
Block a user