-
Notifications
You must be signed in to change notification settings - Fork 5
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
End-to-end publishEntry tests #167
Conversation
Codecov Report
@@ Coverage Diff @@
## development #167 +/- ##
===============================================
+ Coverage 89.34% 89.97% +0.63%
===============================================
Files 43 43
Lines 2486 2633 +147
===============================================
+ Hits 2221 2369 +148
+ Misses 265 264 -1
Continue to review full report at Codecov.
|
#[case::should_not_include_skiplink( | ||
&entry_signed_encoded_unvalidated( | ||
14, | ||
1, | ||
Some(DEFAULT_HASH.parse().unwrap()), | ||
Some(DEFAULT_HASH.parse().unwrap()), | ||
Some(Operation::from(&OperationEncoded::new(OPERATION_ENCODED).unwrap())) | ||
, | ||
key_pair(DEFAULT_PRIVATE_KEY) | ||
), | ||
OPERATION_ENCODED, | ||
"Could not decode payload hash DecodeError" | ||
)] |
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.
Note: Example for error handling discussion
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.
Thank you for finally taking care of this. Looks ready to go to me!
|
||
let response = response.json::<serde_json::Value>().await; | ||
|
||
// TODO: I think we'd like a nicer error message here. |
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'd link to this issue here: #159
* development: End-to-end publishEntry tests (#167)
End-to-end tests (including many failing cases) for publishing entries.
This PR throws up a fewTODO
s as I find some panicking cases. I suggest not fixing them in this PR but instead raising issues.Probably worth waiting for this: p2panda/p2panda#367 then we can introduce tests for these new errors and more invalid encoded entries as well.Targeting p2panda-rs branch which fixes
EntrySigned
validation: https://github.com/p2panda/p2panda/tree/improve-validation-in-entry-signedFollow-up issues: #160 #159
p2panda-rs
and then switch target branch back tomain
📋 Checklist
CHANGELOG.md