Skip to content

Commit 32ce186

Browse files
committed
test(worker): verify durable startup revocation cleanup
1 parent 903568b commit 32ce186

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎src/gateway/server-worker-environment-startup.test.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,15 @@ describe("gateway worker environment startup", () => {
121121
"device-environment",
122122
]);
123123
expect(startup.store.getCredential("device-environment")).toBeUndefined();
124-
expect(startup.store.get("device-environment")?.state).toBe("orphaned");
124+
expect(startup.store.get("device-environment")).toMatchObject({
125+
state: "failed",
126+
leaseId: null,
127+
nodeDeviceId: null,
128+
attachedSessionIds: [],
129+
destroyRequestedAtMs: expect.any(Number),
130+
teardownTerminalState: "failed",
131+
lastError: "Worker provider no longer recognizes the lease",
132+
});
125133
} finally {
126134
await service.stop();
127135
}

0 commit comments

Comments
 (0)