mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-04 02:29:06 +00:00
passwd --reset-keyring keeps cloud sync on (#301)
backup() moved sync.json away with the old keyring, so the fresh keyring never replaced the account copy (seen live on 2026-12-02; fixed by hand with keyring sync --use-local). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cb0a938e89
commit
f10c94ca38
2 changed files with 6 additions and 0 deletions
|
|
@ -81,12 +81,14 @@ describe("logicsrc passwd", () => {
|
|||
|
||||
it("--reset-keyring starts a fresh keyring under the new password and returns its recovery key", async () => {
|
||||
await seed("vault pw", "lost");
|
||||
keyring.writeSync({ cloud: true });
|
||||
const r = await changeAllPasswords(
|
||||
{ noSync: true, resetKeyring: true },
|
||||
{ vault, keyring, ask: answers("vault pw"), askNew: async () => "new", say: () => {} }
|
||||
);
|
||||
expect(r.keyring).toBe("created");
|
||||
expect(r.keyringRecoveryKey).toBeTruthy();
|
||||
expect(keyring.readSync().cloud).toBe(true);
|
||||
await expect(unlockKeyring(keyring.readMeta()!, { passphrase: "new" })).resolves.toBeInstanceOf(Uint8Array);
|
||||
}, 60_000);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue