Skip to content

Commit

Permalink
Fix forked tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lastperson committed Aug 5, 2024
1 parent 48428e3 commit 606da56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
fuser -k 8545/tcp
make start-forkedMainnet FORKED_TESTS_PROVIDER=${{ secrets.FORKED_TESTS_PROVIDER }}
npx truffle test testUnderForked/*
make test-forked
coverage:
needs: test
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ start-forkedMainnet:
@echo " > \033[32mStarting forked environment... \033[0m "
ganache -f $(FORKED_TESTS_PROVIDER) & sleep 3

test-forked:
@echo " > \033[32mTesting contracts... \033[0m "
truffle test --stacktrace testUnderForked/*

start-geth:
@echo " > \033[32mStarting geth... \033[0m "
./scripts/geth/start_geth.sh
Expand Down
4 changes: 2 additions & 2 deletions testUnderForked/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract("TwapFeeHandler - [admin]", async (accounts) => {
const currentFeeHandlerAdmin = accounts[0];

const assertOnlyAdmin = (method, ...params) => {
return TruffleAssert.reverts(
return Helpers.reverts(
method(...params, {from: initialRelayers[1]}),
"sender doesn't have admin role"
);
Expand Down Expand Up @@ -198,7 +198,7 @@ contract("TwapFeeHandler - [admin]", async (accounts) => {
)
);

await TruffleAssert.passes(
await Helpers.passes(
DynamicFeeHandlerInstance.renounceAdmin(
expectedDynamicFeeHandlerAdmin
)
Expand Down

0 comments on commit 606da56

Please sign in to comment.