Skip to content

Commit

Permalink
tests: add schedule and cancel upgrade ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli committed Aug 14, 2024
1 parent c812198 commit 67672b0
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions runtime/integration-tests/src/cases/lp/pool_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -879,3 +879,40 @@ fn recover_assets<T: Runtime>() {
);
});
}

#[test_runtimes([development])]
fn schedule_upgrade<T: Runtime>() {
let mut env = super::setup_full::<T>();
env.state_mut(|evm| {
assert_ok!(pallet_liquidity_pools::Pallet::<T>::schedule_upgrade(
<T as frame_system::Config>::RuntimeOrigin::root(),
EVM_DOMAIN_CHAIN_ID,
evm.deployed(names::POOL_MANAGER).address().into()
));

utils::process_gateway_message::<T>(utils::verify_gateway_message_success::<T>);
});
}

#[test_runtimes([development])]
fn cancel_upgrade<T: Runtime>() {
let mut env = super::setup_full::<T>();
env.state_mut(|evm| {
assert_ok!(pallet_liquidity_pools::Pallet::<T>::schedule_upgrade(
<T as frame_system::Config>::RuntimeOrigin::root(),
EVM_DOMAIN_CHAIN_ID,
evm.deployed(names::POOL_MANAGER).address().into()
));

utils::process_gateway_message::<T>(utils::verify_gateway_message_success::<T>);
});
env.state_mut(|evm| {
assert_ok!(pallet_liquidity_pools::Pallet::<T>::cancel_upgrade(
<T as frame_system::Config>::RuntimeOrigin::root(),
EVM_DOMAIN_CHAIN_ID,
evm.deployed(names::POOL_MANAGER).address().into()
));

utils::process_gateway_message::<T>(utils::verify_gateway_message_success::<T>);
});
}

0 comments on commit 67672b0

Please sign in to comment.