-
-
Notifications
You must be signed in to change notification settings - Fork 617
Fix RustCrypto.resetEncryption
failure
#4772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1466,6 +1466,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH | |
await this.backupManager.deleteAllKeyBackupVersions(); | ||
|
||
this.deleteSecretStorage(); | ||
await this.deleteSecretStorage(); | ||
Comment on lines
1468
to
+1469
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @florianduros: Why do we need to do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, an error during the rebase. Good spot, I'll fix it tomorrow There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed in #4789 |
||
|
||
// Reset the cross-signing keys | ||
await this.crossSigningIdentity.bootstrapCrossSigning({ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the test so this would be caught by it please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is difficult because we are using a mocked SecretStorage which is way faster than the real execution. Meaning that even by adding
jest.fn().mockResolvedValue(undefined)
tostore
orsetDefaultKeyId
, the test passes. Also I don't think that adding manual latency is a good thing neither.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'd prefer the change to
mockResolvedValue
for async methods, even if it doesn't make the test fail. Personally I would add a small delay that makes the test fail but I definitely won't insist on that.I'll tick the PR and you can use your judgement. Thank you!