Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix validator manager contract tests #364

Merged
merged 6 commits into from
Jul 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions packages/contracts/contracts/test/ValidatorManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { IValidatorManager } from "../L1/interfaces/IValidatorManager.sol";
import { L2OutputOracle } from "../L1/L2OutputOracle.sol";
import { ValidatorManager } from "../L1/ValidatorManager.sol";
import { ValidatorPool } from "../L1/ValidatorPool.sol";
import { MockAssetManager } from "./AssetManager.t.sol";
import { ValidatorSystemUpgrade_Initializer } from "./CommonTest.t.sol";

contract MockL2OutputOracle is L2OutputOracle {
Expand Down Expand Up @@ -330,9 +329,7 @@ contract ValidatorManagerTest is ValidatorSystemUpgrade_Initializer {

// Withdraw all assets of jailed validator
uint128 validatorKro = assetMgr.totalValidatorKro(asserter);
vm.warp(assetMgr.canWithdrawAt(asserter) + 1);
vm.startPrank(withdrawAcc);
assetMgr.withdraw(asserter, validatorKro);
_withdraw(asserter, validatorKro);
assertEq(assetMgr.totalValidatorKro(asserter), 0);
assertTrue(valMgr.getStatus(asserter) == IValidatorManager.ValidatorStatus.EXITED);
vm.stopPrank();
seolaoh marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -841,7 +838,7 @@ contract ValidatorManagerTest is ValidatorSystemUpgrade_Initializer {
function test_revertSlash_notColosseum_reverts() external {
vm.prank(trusted);
vm.expectRevert(IValidatorManager.NotAllowedCaller.selector);
valMgr.revertSlash(uint128(1), trusted);
valMgr.revertSlash(1, trusted);
}

function test_slash_notColosseum_reverts() external {
Expand Down
Loading