-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix coverage #16
Fix coverage #16
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
skipFiles: ['mocks', 'utils/Migrations.sol'], | ||
providerOptions: { | ||
default_balance_ether: 1000000000, | ||
total_accounts: 20 | ||
}, | ||
mocha: { | ||
grep: "@skip-on-coverage", | ||
invert: true | ||
} | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,5 @@ module.exports = { | |
enabled: true, | ||
runs: 200 | ||
} | ||
}, | ||
networks: { | ||
soliditycoverage: { | ||
gas: 9000000, | ||
url: 'http://localhost:8555' | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The plugin will set this and it would overwrite this gas value to something bigger because the instrumented contracts are quite a bit larger and the number of opcodes run per tx is greater too. |
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ describe('DCL Names V2', function() { | |
|
||
creationParams = { | ||
...fromDeployer, | ||
gas: 6e6, | ||
//gas: 6e6, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Coverage needs to set this value higher. Defining it here overrides the custom provider settings and causes deployments to run out of gas. If you wanted to keep |
||
gasPrice: 21e9 | ||
} | ||
|
||
|
@@ -2217,7 +2217,7 @@ describe('DCL Names V2', function() { | |
expect(subdomainOwner).to.be.equal(anotherUser) | ||
}) | ||
|
||
it('reverts when trying to change the resolver by an unauthorized account', async function() { | ||
it('reverts when trying to change the resolver by an unauthorized account [ @skip-on-coverage ]', async function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As noted in a comment in the parent issue at solidity-coverage, these tests fail with InvalidJump instead of revert under coverage. Tbh I'm not sure if the coverage report is actually affected by skipping these - I had difficulty locating the implementation for the relevant methods in the code here. |
||
await dclControllerContract.register(subdomain1, user, fromUser) | ||
|
||
await assertRevert( | ||
|
@@ -2312,15 +2312,15 @@ describe('DCL Names V2', function() { | |
) | ||
}) | ||
|
||
it('reverts when trying to set the owner for subdomain by an unauthorized account', async function() { | ||
it('reverts when trying to set the owner for subdomain by an unauthorized account [ @skip-on-coverage ]', async function() { | ||
await dclControllerContract.register(subdomain1, user, fromUser) | ||
|
||
await assertRevert( | ||
ensRegistryContract.setOwner(subdomain1Hash, anotherUser, fromHacker) | ||
) | ||
}) | ||
|
||
it('reverts when trying to set a subnode owner for a domain by an unauthorized account', async function() { | ||
it('reverts when trying to set a subnode owner for a domain by an unauthorized account [ @skip-on-coverage ]', async function() { | ||
await assertRevert( | ||
ensRegistryContract.setSubnodeOwner( | ||
dclDomainHash, | ||
|
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.
This config says: