NexusMutual / smart-contracts

GNU General Public License v3.0
170 stars 62 forks source link

Mocks clean up #1161

Open roxdanila opened 4 months ago

roxdanila commented 4 months ago
  1. Lots of Cover mocks still contain products, productTypes and similar leftovers which should have been removed.
  2. StakingProducts and StakingPool have a Cover mock containing the allocateCapacity function. The function is called from the tests so it will call the StakingPool which is quite redundant as it could have been called from the tests directly impersonating the cover contract address.
  3. The CPMockCover should implement the legacy cover contract for the migration tests, setProductsAndProductTypes should not be present on an actual cover contract mock. Technically this test is short lived, so maybe we can remove the test and its leftover functions entirely after the upgrade.
  4. There could be more issues, these are just some of them.