-
Notifications
You must be signed in to change notification settings - Fork 14
Migrate IexecPoco2#reveal unit tests #114
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
Migrate IexecPoco2#reveal unit tests #114
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #114 +/- ##
========================================
Coverage 83.75% 83.75%
========================================
Files 34 34
Lines 1077 1077
Branches 222 222
========================================
Hits 902 902
Misses 175 175 ☔ View full report in Codecov by Sentry. |
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.
IexecPoco2.reveal.test.ts
or IexecPoco2-reveal.test.ts
?
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 suggest to harmonize all poco test filenames when migration is completed, are you okay with that?
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.
No problem yes.
).to.be.revertedWithoutReason(); // require#5 | ||
}); | ||
|
||
it('Should not reveal when no able to prove result ownership', async () => { |
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.
Maybe a better way to put it, is to contribute with another worker's valid contribution (result hash and seal of worker2).
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.
If you want I can change
.contribute(
[...]
ethers.utils.hexZeroPad('0xbad5ea1', 32), // bad seal
[...]
)
to something like:
.contribute(
[...]
buildResultHashAndResultSeal(taskId, resultDigest, worker2).resultSeal // stolen result seal from another worker
[...]
)
?
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.
Yes perfect!
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.
Co-authored-by: Zied Guesmi <26070035+zguesmi@users.noreply.github.com>
).to.be.revertedWithoutReason(); // require#5 | ||
}); | ||
|
||
it('Should not reveal when no able to prove result ownership', async () => { |
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.
it('Should not reveal when no able to prove result ownership', async () => { | |
it('Should not reveal when unable to prove result ownership', async () => { |
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 missed it thanks! Update test wording
No description provided.