tor-keymgr: Implemented test improvements
Replace string-based metadata in KeyMgr tests with a structured ItemMetadata type that properly tracks:
Item identifiers (coot, moorhen, etc.)
Generation source keystores
Retrieval source keystores
This change improves test assertions by making them more precise and self-documenting, eliminating the confusing string concatenation pattern previously used for tracking keystore operations.
Fixes #1888 (closed)
Merge request reports
Activity
requested review from @gabi-250
- Resolved by vijayabhaskar_78
- Resolved by vijayabhaskar_78
Hi, thank you for the MR!
Before I dig more into the implementation, I have a few high-level comments that need to be addressed:
- CI is failing right now:
clippy
seems unhappy, and the code is misformatted. Please fix the clippy warnings and the formatting issues - I notice you modified the main body of the
KeyMgr
implementation. This surprised me, because the ticket is only about modifying the tests (and testKeystore
implementation). You shouldn't need to modify anything outside of themod test {}
frommgr.rs
. If you find issues with the main implementation and would like to fix them, please open a separate MR for those changes -
generated_in
is set during insertion, whereas #1888 (closed) asks for it to be set inKeygen::generate
. FWIW, the ticket is wrong here, because there's no way to "specify which keystore the item was generated in usingKeygen::generate
, if it was generated this way at all" -- my bad! Maybe we could just make it into a boolean instead?
- CI is failing right now:
added 22 commits
-
105cbf49...4179fd68 - 21 commits from branch
tpo/core:main
- e45fde32 - Merge branch arti:main into main
-
105cbf49...4179fd68 - 21 commits from branch
Hi @gabi-250
I had previously strayed from the scope of #1888 (closed), but I’ve now made the necessary corrections, and the pipeline is passing. Let me know if everything looks good. I appreciate your guidance—thanks a lot!
mentioned in issue #1630 (closed)
- Resolved by gabi-250
- Resolved by gabi-250
- Resolved by gabi-250
- Resolved by gabi-250
- Resolved by gabi-250
- Resolved by gabi-250