mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Adding integration tests (#1426)
* adding parachains integration tests * final integration-tests * Update parachains/integration-tests/statemine/xcm/2_ump.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update parachains/integration-tests/statemine/xcm/1_dmp.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update parachains/integration-tests/statemine/xcm/4_hrmp.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update parachains/integration-tests/statemint/xcm/1_dmp.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update parachains/integration-tests/statemint/xcm/2_ump.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update parachains/integration-tests/statemint/xcm/4_hrmp.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update parachains/integration-tests/statemine/xcm/3_hrmp-open-channels.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update parachains/integration-tests/statemint/xcm/3_hrmp-open-channels.yml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * clean up & trailling spaces * leftovers Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
---
|
||||
settings:
|
||||
chains:
|
||||
relay_chain: &relay_chain
|
||||
wsPort: 9900
|
||||
assets_parachain: &assets_parachain
|
||||
wsPort: 9910
|
||||
paraId: &ap_id 1000
|
||||
penpal_parachain: &penpal_parachain
|
||||
wsPort: 9920
|
||||
paraId: &pp_id 2000
|
||||
variables:
|
||||
common:
|
||||
xcm_verison: &xcm_version '2'
|
||||
require_weight_at_most: &weight_at_most 1000000000
|
||||
chains:
|
||||
relay_chain:
|
||||
signer: &rc_signer //Alice
|
||||
assets_parachain_destination: &ap_dest { v1: { 0, interior: { x1: { parachain: *ap_id }}}}
|
||||
penpal_parachain:
|
||||
signer: &pp_signer //Alice
|
||||
decodedCalls:
|
||||
ap_force_xcm_version:
|
||||
chain: *assets_parachain
|
||||
pallet: polkadotXcm
|
||||
call: forceXcmVersion
|
||||
args: [
|
||||
{ # location
|
||||
parents: 1,
|
||||
interior: Here
|
||||
},
|
||||
*xcm_version # xcmVersion
|
||||
]
|
||||
|
||||
tests:
|
||||
- name: Initialize Chains
|
||||
its:
|
||||
- name: XCM supported versions between chains
|
||||
actions:
|
||||
- extrinsics: # Relay Chain sets supported version for Assset Parachain
|
||||
- chain: *relay_chain
|
||||
sudo: true
|
||||
signer: *rc_signer
|
||||
pallet: xcmPallet
|
||||
call: forceXcmVersion
|
||||
args: [
|
||||
{ # location
|
||||
parents: 0,
|
||||
interior: {
|
||||
X1: {
|
||||
Parachain: *ap_id
|
||||
}
|
||||
}
|
||||
},
|
||||
*xcm_version # xcmVersion
|
||||
]
|
||||
events:
|
||||
- name: sudo.Sudid
|
||||
attributes:
|
||||
type: Result<Null, SpRuntimeDispatchError>
|
||||
value: Ok
|
||||
- name: xcmPallet.SupportedVersionChanged
|
||||
attribute:
|
||||
type: u32
|
||||
value: *xcm_version
|
||||
- extrinsics: # Relay Chain sets supported version for Penpal Parachain
|
||||
- chain: *relay_chain
|
||||
sudo: true
|
||||
signer: *rc_signer
|
||||
pallet: xcmPallet
|
||||
call: forceXcmVersion
|
||||
args: [
|
||||
{ # location
|
||||
parents: 0,
|
||||
interior: {
|
||||
X1: {
|
||||
Parachain: *pp_id
|
||||
}
|
||||
}
|
||||
},
|
||||
*xcm_version # xcmVersion
|
||||
]
|
||||
events:
|
||||
- name: sudo.Sudid
|
||||
attributes:
|
||||
type: Result<Null, SpRuntimeDispatchError>
|
||||
value: Ok
|
||||
- name: xcmPallet.SupportedVersionChanged
|
||||
attribute:
|
||||
type: u32
|
||||
value: *xcm_version
|
||||
- extrinsics: # Assset Parachain sets supported version for Relay Chain through it
|
||||
- chain: *relay_chain
|
||||
signer: *rc_signer
|
||||
sudo: true
|
||||
pallet: xcmPallet
|
||||
call: send
|
||||
args: [
|
||||
*ap_dest, # destination
|
||||
{
|
||||
v2: [ #message
|
||||
{
|
||||
Transact: {
|
||||
originType: Superuser,
|
||||
requireWeightAtMost: *weight_at_most,
|
||||
call: $ap_force_xcm_version
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
events:
|
||||
- name: sudo.Sudid
|
||||
attribute:
|
||||
type: Result<Null, SpRuntimeDispatchError>
|
||||
value: Ok
|
||||
- name: xcmPallet.Sent
|
||||
- name: polkadotXcm.SupportedVersionChanged
|
||||
chain: *assets_parachain
|
||||
attribute:
|
||||
type: u32
|
||||
value: *xcm_version
|
||||
- extrinsics: # Penpal Parachain sets supported version for Relay Chain
|
||||
- chain: *penpal_parachain
|
||||
signer: *pp_signer
|
||||
sudo: true
|
||||
pallet: polkadotXcm
|
||||
call: forceXcmVersion
|
||||
args: [
|
||||
{ # location
|
||||
parents: 1,
|
||||
interior: Here
|
||||
},
|
||||
*xcm_version # xcmVersion
|
||||
]
|
||||
events:
|
||||
- name: sudo.Sudid
|
||||
attribute:
|
||||
type: Result<Null, SpRuntimeDispatchError>
|
||||
value: Ok
|
||||
- name: polkadotXcm.SupportedVersionChanged
|
||||
attribute:
|
||||
type: u32
|
||||
value: *xcm_version
|
||||
Reference in New Issue
Block a user