Skip to content

Commit

Permalink
fix: fix unit-test ci (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 authored Mar 6, 2025
1 parent e0792c7 commit 80ae699
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-bsc-hardfork-bytecode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-genesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
8 changes: 8 additions & 0 deletions test/TokenRecoverPortal.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ contract TokenRecoverPortalTest is Deployer {

function setUp() public {
vm.mockCall(address(0x69), "", mockTokenOwner);
// slot id for `merkleRootAlreadyInit`
bytes32 slot = bytes32(uint256(105));

// change `merkleRootAlreadyInit` to false
vm.store(address(tokenRecoverPortal), slot, bytes32(uint256(0)));

// check `merkleRootAlreadyInit` is false
assertEq(tokenRecoverPortal.merkleRootAlreadyInit(), false);
}

function setUpContractParams(
Expand Down
2 changes: 1 addition & 1 deletion test/ValidatorSet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ contract ValidatorSetTest is Deployer {
bscValidatorSet.deposit{ value: amount }(validator0);

vm.stopPrank();
assertEq(bscValidatorSet.getTurnLength(), 1);
assertEq(bscValidatorSet.getTurnLength(), 4);
bytes memory key = "turnLength";
bytes memory value = bytes(hex"0000000000000000000000000000000000000000000000000000000000000005"); // 5
_updateParamByGovHub(key, value, address(bscValidatorSet));
Expand Down

0 comments on commit 80ae699

Please sign in to comment.