Skip to content

Commit

Permalink
Fix failing tests for AaveV3LeverageStrategyExtension (#147)
Browse files Browse the repository at this point in the history
* Fix failing tests

* Adjust test message for ripcord test
  • Loading branch information
ckoopmann authored Aug 14, 2023
1 parent e42ba80 commit d274ec1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/integration/ethereum/aaveV3LeverageStrategyExtension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ if (process.env.INTEGRATIONTEST) {
context("when methodology settings are increased beyond default maximum", () => {
let newMethodology: MethodologySettings;
let newIncentive: IncentiveSettings;
const leverageCutoff = ether(2.2); // Value of leverage that can only be exceeded with eMode activated
const leverageCutoff = ether(2.21); // Value of leverage that can only be exceeded with eMode activated
beforeEach(() => {
subjectCaller = owner;
});
Expand Down Expand Up @@ -1958,7 +1958,7 @@ if (process.env.INTEGRATIONTEST) {
.rebalance(subjectExchangeToUse);
}

describe("when leverage ratio is above max and it drops further between rebalances", async () => {
describe("when leverage ratio is above max and rises further between rebalances", async () => {
it("should set the global and exchange timestamps correctly", async () => {
await subject();
const timestamp1 = await getLastBlockTimestamp();
Expand Down Expand Up @@ -3534,6 +3534,14 @@ if (process.env.INTEGRATIONTEST) {
await chainlinkCollateralPriceMock.setPrice(initialCollateralPrice);

subjectCaller = owner;

const oldExecution = await leverageStrategyExtension.getExecution();
const newExecution: ExecutionSettings = {
unutilizedLeveragePercentage: oldExecution.unutilizedLeveragePercentage,
twapCooldownPeriod: oldExecution.twapCooldownPeriod,
slippageTolerance: ether(0.05),
};
await leverageStrategyExtension.setExecutionSettings(newExecution);
});

async function subject(): Promise<any> {
Expand Down

0 comments on commit d274ec1

Please sign in to comment.