Skip to content
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

Add key manager unit tests, add Web5Error::Mutex #304

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

KendallWeihe
Copy link
Contributor

No description provided.

Copy link
Contributor

@nitro-neal nitro-neal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@KendallWeihe
Copy link
Contributor Author

KendallWeihe commented Aug 22, 2024

Opened #305 into this PR


@diehuxx I like both suggestions! I think I'll open a third PR into #305

Edit: going to slow down, don't want to end up in rebase nightmare

public_jwk.d = None;

let result = key_manager.import_private_jwk(public_jwk);
assert!(result.is_err());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instead of asserting is_err() and is_ok(), how do you feel about expect_err("private_jwk must be a private key") and expect("whatever the helpful error message is")? slightly tighter than asserting Ok/Err than unwrapping in the following line

@KendallWeihe
Copy link
Contributor Author

Need to rebase and use the latest from #303 prior to merging this (remove all instances of LazyLock!)

@KendallWeihe KendallWeihe merged commit 74bd570 into main Aug 22, 2024
16 checks passed
@KendallWeihe KendallWeihe deleted the kendall/key-managers branch August 22, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants