test(cli): update daemon auth fixtures

This commit is contained in:
Mark IJbema
2026-07-02 15:00:40 +02:00
parent fed1e5ef9d
commit 5a916f34ee
@@ -22,7 +22,7 @@ function state(input: Partial<Daemon.Network> = {}) {
port: options.port,
url: `http://${options.hostname}:${options.port}`,
username: "kilo",
password: "kilo",
password: "secret",
token: "token",
version: "test",
startedAt: new Date(0).toISOString(),
@@ -99,6 +99,10 @@ describe("console daemon startup", () => {
expect(Daemon.matches(state(), opts({ port: 0 }), ["port"])).toBe(true)
})
test("rejects legacy fixed-password daemon state", () => {
expect(Daemon.matches({ ...state(), password: "kilo" }, opts(), [])).toBe(false)
})
test("supports daemon state written before network options were persisted", () => {
const current = { ...state(), options: undefined }