From 67672b05cfc292db33e4c142cdac5ca31ed9acf4 Mon Sep 17 00:00:00 2001 From: William Freudenberger Date: Wed, 14 Aug 2024 06:36:41 +0200 Subject: [PATCH] tests: add schedule and cancel upgrade ITs --- .../src/cases/lp/pool_management.rs | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/runtime/integration-tests/src/cases/lp/pool_management.rs b/runtime/integration-tests/src/cases/lp/pool_management.rs index 8b3b62ac65..7e0636ab25 100644 --- a/runtime/integration-tests/src/cases/lp/pool_management.rs +++ b/runtime/integration-tests/src/cases/lp/pool_management.rs @@ -879,3 +879,40 @@ fn recover_assets() { ); }); } + +#[test_runtimes([development])] +fn schedule_upgrade() { + let mut env = super::setup_full::(); + env.state_mut(|evm| { + assert_ok!(pallet_liquidity_pools::Pallet::::schedule_upgrade( + ::RuntimeOrigin::root(), + EVM_DOMAIN_CHAIN_ID, + evm.deployed(names::POOL_MANAGER).address().into() + )); + + utils::process_gateway_message::(utils::verify_gateway_message_success::); + }); +} + +#[test_runtimes([development])] +fn cancel_upgrade() { + let mut env = super::setup_full::(); + env.state_mut(|evm| { + assert_ok!(pallet_liquidity_pools::Pallet::::schedule_upgrade( + ::RuntimeOrigin::root(), + EVM_DOMAIN_CHAIN_ID, + evm.deployed(names::POOL_MANAGER).address().into() + )); + + utils::process_gateway_message::(utils::verify_gateway_message_success::); + }); + env.state_mut(|evm| { + assert_ok!(pallet_liquidity_pools::Pallet::::cancel_upgrade( + ::RuntimeOrigin::root(), + EVM_DOMAIN_CHAIN_ID, + evm.deployed(names::POOL_MANAGER).address().into() + )); + + utils::process_gateway_message::(utils::verify_gateway_message_success::); + }); +}