mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 19:35:28 -06:00
refactor(state): move device identity into canonical SQLite state (#110392)
* refactor: store device identities in SQLite * style: satisfy Swift identity lint limits * test: harden device identity migration fixtures * fix: harden SQLite device identity recovery * chore: remove stale identity helper * refactor: isolate device identity repair * chore: remove stale migration import * test: validate migrated identity key types * fix: harden device identity repair * style: format device identity assertion * fix: derive repaired identity key from PEM * style: remove redundant PEM conversions * fix: align native identity store with schema v4 * fix(state): satisfy SQLite identity CI gates * fix(state): coordinate native identity migration * test(doctor): include native identity claim path * fix(infra): preserve coordinator release error * fix(state): clear identity validation gates * refactor(apple): remove identity test-only APIs * refactor(apple): remove dead identity error type * test(apple): use canonical identity test seam * test(macos): isolate gateway readiness identity
This commit is contained in:
committed by
GitHub
parent
d022b1f560
commit
98410d986e
@@ -54,11 +54,11 @@ describe("runNodeIdentityShow", () => {
|
||||
runNodeIdentityShow({});
|
||||
expect(errorSpy).toHaveBeenCalledOnce();
|
||||
expect(exitSpy).toHaveBeenCalledWith(1);
|
||||
expect(fs.existsSync(path.join(stateDir, "identity", "device.json"))).toBe(false);
|
||||
expect(fs.existsSync(path.join(stateDir, "state", "openclaw.sqlite"))).toBe(false);
|
||||
});
|
||||
|
||||
it("writes deviceId and raw public key JSON to stdout", () => {
|
||||
const identity = loadOrCreateDeviceIdentity(path.join(stateDir, "identity", "device.json"));
|
||||
const identity = loadOrCreateDeviceIdentity();
|
||||
runNodeIdentityShow({ json: true });
|
||||
expect(exitSpy).not.toHaveBeenCalled();
|
||||
expect(logSpy).not.toHaveBeenCalled();
|
||||
@@ -75,7 +75,7 @@ describe("runNodeIdentityShow", () => {
|
||||
});
|
||||
|
||||
it("prints human-readable lines without --json", () => {
|
||||
const identity = loadOrCreateDeviceIdentity(path.join(stateDir, "identity", "device.json"));
|
||||
const identity = loadOrCreateDeviceIdentity();
|
||||
runNodeIdentityShow({});
|
||||
expect(exitSpy).not.toHaveBeenCalled();
|
||||
const output = logSpy.mock.calls.map((call: unknown[]) => String(call[0])).join("\n");
|
||||
|
||||
Reference in New Issue
Block a user