Skip to content
Snippets Groups Projects
Unverified Commit 369e32b1 authored by Branislav Kontur's avatar Branislav Kontur
Browse files

Authorize upgrade tests for testnet runtimes + `execute_as_governance` refactor (#7656)


Relates to: https://github.com/paritytech/polkadot-sdk/issues/7541
Relates to: https://github.com/paritytech/polkadot-sdk/issues/7566

This PR contains improved test cases that rely on the governance
location as preparation for AHM to capture the state as it is.
It introduces `execute_as_governance_call`, which can be configured with
various governance location setups instead of the hard-coded
`Location::parent()`.

Additionally, it adds a test for `authorize_upgrade` to all SP testnets.


## TODO
- [x] rewrite all tests using
`RuntimeHelper::<Runtime>::execute_as_governance` (because it is using
hard-coded `Location::parent()`) to use
`RuntimeHelper::<Runtime>::execute_as_governance_call`

## Follow-up
- [ ] add similar test for westend-runtime
- [ ] add test that ensure xcm-executor adds `ClearOrigin` before all
side-effect sent to different chain

---------

Co-authored-by: default avatarcmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit e9be92d6)

# Conflicts:
#	cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs
parent 803890b4
No related merge requests found
Pipeline #517481 waiting for manual action with stages
in 11 seconds
Showing
with 559 additions and 92 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment