Closed jmonteer closed 2 years ago
test__lossy_strategy_flow: test will implement a full scenario in which there is a lossy strategy and users that take losses.
update_debt
process_report
: there should be a loss and current_debt on strategy should reflect itprice_per_share
should be below 1:1update_debt
on strategyprocess_report
: there should be a loss and strategy.current_debt
on strategy should reflect itmin_total_idle
(on a lossy strategy situation we want to ensure that the vault has assets for users to withdraw)update_debt
to reflect changes on the strategytotal_idle
update_debt
to ensure min_total_idle
on vault: we can ensure that min_total_idle
forces the strategy to return all its debtnow that _profitdistribution issue is done, we can add a similar scenario with a profitable strategy:
test__profitable_strategy_flow: test will implement a full scenario in which there is a profitable strategy and users that take profits. We can use the lossy strategy contract, so we can also create losses.
Description: Before deploying any code and entering into "test in prod phase", we need to build an extensive suite of E2E tests.
E2E tests need to cover from basic behavior to complex one
To achieve good test coverage at the lowest cost possible we will split test writting in two weeks.
1 week of tests (from today 21st of July to next Thursday 28th of July)
1 week of more complex tests (from 28th July to 4th August):
The objective is that contributors are incentivised to create tests ASAP in the first week to receive payment, tackling first the most simple ones but also doing complex ones at the less expensive rate.
Tests must be proposed in a comment in this issue: 1 test - 1 comment The format will be
*test__doing_whatever_by_role_X__reverts*: description of the test
Approved tests will have a reaction of 👍 by a yearn contributor Rejected tests will have nothing and might be commented for them to be amended or improved
IMPORTANT: tests should have a bare minimum quality and complexity. Those that are not complex enough but need to be implemented will be put together in a separate issue and be implemented in a batch as a dev-lvl-0 bounty. Feel free to suggest whatever test though
Dependencies: NA
Acceptance criteria:
Payment Trigger: PR is merged
Category: DEV
Level: NA