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

Improved bounty tests. #1350

Merged
merged 3 commits into from
Sep 26, 2018
Merged

Improved bounty tests. #1350

merged 3 commits into from
Sep 26, 2018

Conversation

nventuro
Copy link
Contributor

The old tests were downright bizarre: the new suite better shows how bounty can be claimed after a vulnerability is exploited. Also, coverage should now be 100%.

@nventuro nventuro added kind:improvement tests Test suite and helpers. labels Sep 25, 2018
contract SecureInvariantTargetMock is Target {
function checkInvariant() public returns(bool) {
contract TargetMock is Target {
bool private pwned;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, change to exploited or something less 1337.

});
});
it('can set reward', async function () {
await sendReward(owner, this.bounty.address, reward);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like this sendReward name. What would you think of dropping the function and just calling web3.eth.sendTransaction?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #1358

@frangio frangio added this to the v2.0 milestone Sep 26, 2018
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

LGTM

@frangio frangio merged commit ae109f6 into OpenZeppelin:master Sep 26, 2018
frangio pushed a commit that referenced this pull request Sep 26, 2018
* Improved bounty tests.

* Fixed linter errors.

* Addressed review comments.

(cherry picked from commit ae109f6)
@nventuro nventuro deleted the bounty-tests branch September 26, 2018 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Test suite and helpers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants