test: tighten device identity storage assertions · openclaw/openclaw@1e9ddc3
steipete
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -92,13 +92,11 @@ describe("device identity crypto helpers", () => {
|
92 | 92 | signDevicePayload(loaded.privateKeyPem, "hello"), |
93 | 93 | ), |
94 | 94 | ).toBe(true); |
95 | | -expect(stored).toMatchObject({ |
96 | | -version: 1, |
97 | | -deviceId: SWIFT_RAW_DEVICE_ID, |
98 | | -publicKeyPem: expect.stringContaining("BEGIN PUBLIC KEY"), |
99 | | -privateKeyPem: expect.stringContaining("BEGIN PRIVATE KEY"), |
100 | | -createdAtMs: 1_700_000_000_000, |
101 | | -}); |
| 95 | +expect(stored.version).toBe(1); |
| 96 | +expect(stored.deviceId).toBe(SWIFT_RAW_DEVICE_ID); |
| 97 | +expect(stored.publicKeyPem).toEqual(expect.stringContaining("BEGIN PUBLIC KEY")); |
| 98 | +expect(stored.privateKeyPem).toEqual(expect.stringContaining("BEGIN PRIVATE KEY")); |
| 99 | +expect(stored.createdAtMs).toBe(1_700_000_000_000); |
102 | 100 | expect(stored).not.toHaveProperty("publicKey"); |
103 | 101 | expect(stored).not.toHaveProperty("privateKey"); |
104 | 102 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。