-
Notifications
You must be signed in to change notification settings - Fork 71
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
miner actor: construction tests #42
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.
LGTM, once it passes
for i in 0..WPOST_PERIOD_DEADLINES { | ||
let c = deadlines.due[i as usize]; |
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.
You can just iterate over deadlines.due
. Or deadlines.due.iter().enumerate()
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 was following the go test and didn't think rust enough.
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 i'll keep it braindead to be as close to the original test as possible.
rebased on master for the workflow thing. |
the first test for this poor actor!
Added the remaining miner construction tests and did a bit of squashing. |
&RawBytes::serialize(params).unwrap(), | ||
) | ||
.unwrap_err(); | ||
assert_eq!(result.exit_code(), ExitCode::ErrIllegalArgument); |
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.
Not for this PR but one thing we are missing compared to go tests is checking substrings of the error. I'd like to see us add an analogue of ExpectAbortContainsMessage. What do you think @vyzo? I know you aren't a big fan of checking error strings.
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.
dunno, i really dont like parsing error messages, but maybe it makes sense here.
Lets open issue to keep track of this?
Unit tests for #27