Skip to content

Commit

Permalink
fix: tests and snapshot (yearn#9)
Browse files Browse the repository at this point in the history
* fix: tests

* chore: add snapshot to make
  • Loading branch information
Schlagonia authored Jul 27, 2023
1 parent 575ddf7 commit 2bc751d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ test-contract-gas :; forge test --gas-report --match-contract ${contract} --for
trace-contract :; forge test -vvv --match-contract $(contract) --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
test-test :; forge test -vv --match-test $(test) --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
trace-test :; forge test -vvv --match-test $(test) --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
snapshot :; forge snapshot -vv --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
snapshot-diff :; forge snapshot --diff -vv --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}


clean :; forge clean
snapshot :; forge snapshot
7 changes: 0 additions & 7 deletions src/test/Operation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ contract OperationTest is Setup {
vm.prank(user);
strategy.redeem(_amount, user, user);

// TODO: Adjust if there are fees
checkStrategyTotals(strategy, 0, 0, 0);

assertGe(
asset.balanceOf(user),
balanceBefore + _amount,
Expand Down Expand Up @@ -93,9 +90,6 @@ contract OperationTest is Setup {
vm.prank(user);
strategy.redeem(_amount, user, user);

uint256 expectedFees = (profit * strategy.performanceFee()) / MAX_BPS;

// TODO: Adjust based on fees.
assertGe(
asset.balanceOf(user),
balanceBefore + _amount,
Expand Down Expand Up @@ -147,7 +141,6 @@ contract OperationTest is Setup {
vm.prank(user);
strategy.redeem(_amount, user, user);

// TODO: Adjust if there are fees
assertGe(
asset.balanceOf(user),
balanceBefore + _amount,
Expand Down
3 changes: 0 additions & 3 deletions src/test/Shutdown.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ contract ShutdownTest is Setup {
vm.prank(user);
strategy.redeem(_amount, user, user);

// TODO: Adjust if there are fees
checkStrategyTotals(strategy, 0, 0, 0);

assertGe(
asset.balanceOf(user),
balanceBefore + _amount,
Expand Down

0 comments on commit 2bc751d

Please sign in to comment.