diff --git a/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol b/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol index 0a6bd5d5a..001260350 100644 --- a/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol +++ b/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol @@ -40,8 +40,6 @@ abstract contract PoSValidatorManagerTest is ValidatorManagerTest { event ValidationUptimeUpdated(bytes32 indexed validationID, uint64 uptime); - event GeoffEvent(uint256 num); - event DelegatorAdded( bytes32 indexed delegationID, bytes32 indexed validationID, @@ -415,6 +413,20 @@ abstract contract PoSValidatorManagerTest is ValidatorManagerTest { ); } + function testInitializeEndValidationNotOwner() public { + bytes32 validationID = _setUpCompleteValidatorRegistration({ + nodeID: DEFAULT_NODE_ID, + subnetID: DEFAULT_SUBNET_ID, + weight: DEFAULT_WEIGHT, + registrationExpiry: DEFAULT_EXPIRY, + blsPublicKey: DEFAULT_BLS_PUBLIC_KEY, + registrationTimestamp: DEFAULT_REGISTRATION_TIMESTAMP + }); + vm.prank(address(1)); + vm.expectRevert("PoSValidatorManager: validator not owned by sender"); + posValidatorManager.initializeEndValidation(validationID, false, 0); + } + function testInitializeEndDelegation() public { bytes32 validationID = _setUpCompleteValidatorRegistration({ nodeID: DEFAULT_NODE_ID,