ssvlabs / ssv-network

SSV Network's smart contracts
https://ssv.network/
GNU General Public License v3.0
46 stars 27 forks source link

[Update]: Improve coverage #293

Open Mohsen-T opened 9 months ago

Mohsen-T commented 9 months ago
mtabasco commented 9 months ago
image

@Mohsen-T to reach this point, create a test in test/validators/remove.ts trying to remove an existing validator (publicKey correct) with the wrong parameters (msg.sender or operatorIds)

mtabasco commented 9 months ago
image

@Mohsen-T please create a test to fire the revert PublicKeysSharesLengthMismatch

mtabasco commented 9 months ago
image

In ClusterLib.sol seems this line is skipped. The test Register validator in a new cluster with incorrect input data passes the wrong cluster data. Maybe you can pass specifically that parameter wrong to include that line in the coverage? thanks

mtabasco commented 9 months ago
image image

In OperatorsLib.sol, we haven't tested ExceedValidatorLimit error😱

mtabasco commented 9 months ago
image

ProtocolLib.sol Please test the MaxValueExceeded error

mtabasco commented 9 months ago
image image

ValidatorLib.sol Please test InvalidOperatorIdsLength and InvalidPublicKeyLength

mtabasco commented 9 months ago
image

please skip contracts/upgrades from the coverage test