test owner upgradable (#1207)

This commit is contained in:
Dev Kalra 2024-01-07 17:31:34 +05:30 committed by GitHub
parent 1778871b8b
commit 220e06a62d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -91,6 +91,15 @@ contract ExecutorTest is Test, WormholeTestUtils {
); );
} }
function testExecutorOwner() public {
assertEq(address(executor), executor.owner());
}
function testExternaUpgradeCallFails() public {
vm.expectRevert("Ownable: caller is not the owner");
executor.upgradeTo(address(executor2));
}
function testUpgradeCallSucceedsForContractWithCorrectMagic() public { function testUpgradeCallSucceedsForContractWithCorrectMagic() public {
bytes memory vaa = getTestUpgradeVaa(address(executor2)); bytes memory vaa = getTestUpgradeVaa(address(executor2));
executor.execute(vaa); executor.execute(vaa);