-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: add negative integration tests #85
Conversation
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.
Looks awesome overall. Only some minor questions.
mod key { | ||
use rand::{distributions::Alphanumeric, Rng}; | ||
|
||
pub fn random() -> String { |
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.
Let;s clarify that this is a sk. And I guess it's better to return it as a SecretKey type and stringify if needed.
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.
The reason why I went with strings everywhere is because I wanted to be uniform with malformed values (which are not representable with the strict SecretKey
type).
}) | ||
.await?; | ||
assert_eq!(status_code, 500); | ||
assert!(matches!(new_acc_response, NewAccountResponse::Err { .. })); |
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.
Should we comapre the error message here? Check for actual erro type?
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.
We could yeah. I think generally parameterizing NewAccountResponse::Err
with kind
could be a good idea.
This PR streamlines writing integration tests and introduces a bunch of negative scenarios.