-
Notifications
You must be signed in to change notification settings - Fork 37
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
[PM-8301] Create bitwarden-send #829
Conversation
crates/bitwarden-send/src/error.rs
Outdated
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 parse error is similar to CipherParseError, perhaps we should expose a generic ParseError in bitwarden-core?
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.
Do you mean VaultParseError
? And yeah if it's going to be used in multiple places, I think sharing it would make sense.
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #829 +/- ##
=======================================
Coverage 59.22% 59.22%
=======================================
Files 186 188 +2
Lines 12396 12403 +7
=======================================
+ Hits 7341 7346 +5
- Misses 5055 5057 +2 โ View full report in Codecov by Sentry. |
# Conflicts: # .github/workflows/publish-rust-crates.yml # Cargo.lock # Cargo.toml # crates/bitwarden/Cargo.toml # crates/bitwarden/src/error.rs
struct MockKeyContainer(HashMap<Option<Uuid>, SymmetricCryptoKey>); | ||
impl MockKeyContainer { | ||
fn new(master_key: MasterKey, user_key: EncString) -> Result<Self, CryptoError> { | ||
let user_key = master_key.decrypt_user_key(user_key)?; | ||
Ok(Self(HashMap::from([(None, user_key)]))) | ||
} | ||
} | ||
impl KeyContainer for MockKeyContainer { | ||
fn get_key<'a>(&'a self, org_id: &Option<Uuid>) -> Option<&'a SymmetricCryptoKey> { | ||
self.0.get(org_id) | ||
} | ||
} |
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.
I think long term we should consider extracting this into a test crate or something.
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.
Yeah I think a separate test crate, or maybe even just a dedicated test module in bitwarden-core
would be helpful in the future
๐๏ธ Tracking
https://bitwarden.atlassian.net/browse/PM-8301
๐ Objective
Extract send to separate crate.
โฐ Reminders before review
team
๐ฆฎ Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or โน๏ธ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or ๐ญ (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or โป๏ธ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes