mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
e2e tests for Gov2 (#2944)
* Fellowship e2e tests * fixes * fixe wrong result * Update parachains/integration-tests/e2e/collectives/README.md * Apply suggestions from code review Co-authored-by: Squirrel <gilescope@gmail.com> * fixes --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Squirrel <gilescope@gmail.com>
This commit is contained in:
+72
-4
@@ -6,6 +6,9 @@ settings:
|
||||
collectives_parachain: &collectives_parachain
|
||||
wsPort: 9710
|
||||
paraId: &cp_id 1001
|
||||
assethub_parachain: &assethub_parachain
|
||||
wsPort: 9810
|
||||
paraId: &sp_id 1000
|
||||
variables:
|
||||
xcm_version: &xcm_version 3
|
||||
weight_threshold: &weight_threshold { refTime: [10, 10], proofSize: [10, 10] }
|
||||
@@ -13,7 +16,7 @@ settings:
|
||||
accounts:
|
||||
alice_signer: &alice_signer //Alice
|
||||
decodedCalls:
|
||||
cp_force_xcm_version:
|
||||
ap_force_xcm_version:
|
||||
chain: *collectives_parachain
|
||||
pallet: polkadotXcm
|
||||
call: forceXcmVersion
|
||||
@@ -64,7 +67,7 @@ tests:
|
||||
v3: [ # message
|
||||
{
|
||||
UnpaidExecution: {
|
||||
weightLimit: {
|
||||
weightLimit: {
|
||||
limited: {
|
||||
refTime: 2200000000, # 2_200_000_000
|
||||
proofSize: 200000, # 200_000
|
||||
@@ -79,7 +82,7 @@ tests:
|
||||
refTime: 200000000, # 200_000_000
|
||||
proofSize: 0,
|
||||
},
|
||||
call: $cp_force_xcm_version
|
||||
call: $ap_force_xcm_version
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -89,10 +92,75 @@ tests:
|
||||
- name: sudo.Sudid
|
||||
result: { sudoResult: Ok }
|
||||
- name: xcmPallet.Sent
|
||||
- name: polkadotXcm.SupportedVersionChanged
|
||||
chain: *collectives_parachain
|
||||
result: { location: { parents: 1, interior: Here }, version: *xcm_version }
|
||||
- name: dmpQueue.ExecutedDownward
|
||||
chain: *collectives_parachain
|
||||
threshold: *weight_threshold
|
||||
result: { outcome: { Complete: { refTime: '2,200,000,000', proofSize: 0 }}}
|
||||
- extrinsics: # Relay Chain sets supported version for AssetHub Parachain
|
||||
- chain: *relay_chain
|
||||
sudo: true
|
||||
signer: *alice_signer
|
||||
pallet: xcmPallet
|
||||
call: forceXcmVersion
|
||||
args: [
|
||||
{ # location
|
||||
parents: 0,
|
||||
interior: {
|
||||
X1: {
|
||||
Parachain: *sp_id
|
||||
}
|
||||
}
|
||||
},
|
||||
*xcm_version
|
||||
]
|
||||
events:
|
||||
- name: sudo.Sudid
|
||||
result: { sudoResult: Ok }
|
||||
- name: xcmPallet.SupportedVersionChanged
|
||||
result: { location: { parents: 0, interior: { X1: { Parachain: *sp_id } } }, version: *xcm_version }
|
||||
- extrinsics: # AssetHub Parachain sets supported version for Relay Chain through it
|
||||
- chain: *relay_chain
|
||||
signer: *alice_signer
|
||||
sudo: true
|
||||
pallet: xcmPallet
|
||||
call: send
|
||||
args: [
|
||||
{ v3: { 0, interior: { x1: { parachain: *sp_id }}}}, # destination
|
||||
{
|
||||
v3: [ # message
|
||||
{
|
||||
UnpaidExecution: {
|
||||
weightLimit: {
|
||||
limited: {
|
||||
refTime: 2200000000, # 2_200_000_000
|
||||
proofSize: 200000, # 200_000
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
Transact: {
|
||||
originKind: Superuser,
|
||||
requireWeightAtMost: {
|
||||
refTime: 200000000, # 200_000_000
|
||||
proofSize: 0,
|
||||
},
|
||||
call: $ap_force_xcm_version
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
events:
|
||||
- name: sudo.Sudid
|
||||
result: { sudoResult: Ok }
|
||||
- name: xcmPallet.Sent
|
||||
- name: polkadotXcm.SupportedVersionChanged
|
||||
chain: *collectives_parachain
|
||||
chain: *assethub_parachain
|
||||
result: { location: { parents: 1, interior: Here }, version: *xcm_version }
|
||||
- name: dmpQueue.ExecutedDownward
|
||||
chain: *assethub_parachain
|
||||
result: { outcome: { Complete: {} } }
|
||||
|
||||
+1
-2
@@ -14,7 +14,6 @@ settings:
|
||||
alice_ss58: &acc_alice_ss58 '15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5'
|
||||
checking_account: &checking_account '13UVJyLnbVp9x5XDyJv8g8r3UddNwBrdaH7AADCmw9XQWvYW'
|
||||
|
||||
|
||||
tests:
|
||||
- name: Teleport assets from Relay Chain to Collectives Parachain successful.
|
||||
before:
|
||||
@@ -131,7 +130,7 @@ tests:
|
||||
- name: messageQueue.Processed
|
||||
chain: *relay_chain
|
||||
threshold: *weight_threshold
|
||||
result: { origin: { Ump: { Para: '1,001' } }, weightUsed: { refTime: '4,000,000,000', proofSize: '0' }, success: true }
|
||||
result: { origin: { Ump: { Para: *cp_id } }, weightUsed: { refTime: '4,000,000,000', proofSize: '0' }, success: true }
|
||||
- queries:
|
||||
balance_rc_alice_3:
|
||||
chain: *relay_chain
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
settings:
|
||||
chains:
|
||||
relay_chain: &relay_chain
|
||||
wsPort: 9700
|
||||
collectives_parachain: &collectives_parachain
|
||||
wsPort: 9710
|
||||
paraId: &cp_id 1001
|
||||
assethub_parachain: &assethub_parachain
|
||||
wsPort: 9810
|
||||
paraId: &sp_id 1000
|
||||
variables:
|
||||
chains:
|
||||
accounts:
|
||||
alice_signer: &alice_signer //Alice
|
||||
hrmp:
|
||||
proposed_max_capacity: &hrmp_proposed_max_capacity 8
|
||||
proposed_max_message_size: &hrmp_proposed_max_message_size 8192
|
||||
tests:
|
||||
- name: HRMP
|
||||
describes:
|
||||
- name: Force Open HRMP Channel From Collectives Parachain → AssetHub Parachain
|
||||
its:
|
||||
- name: Alice calls hrmp.forceOpenHrmpChannel
|
||||
actions:
|
||||
- extrinsics:
|
||||
- chain: *relay_chain
|
||||
signer: *alice_signer
|
||||
sudo: true
|
||||
pallet: hrmp
|
||||
call: forceOpenHrmpChannel
|
||||
args: [
|
||||
*cp_id, # sender
|
||||
*sp_id, # recipient
|
||||
*hrmp_proposed_max_capacity, # proposedMaxCapacity
|
||||
*hrmp_proposed_max_message_size # proposedMaxMessageSize
|
||||
]
|
||||
events:
|
||||
- name: hrmp.HrmpChannelForceOpened
|
||||
result: [*cp_id, *sp_id, *hrmp_proposed_max_capacity, *hrmp_proposed_max_message_size]
|
||||
- name: Force Open HRMP Channel From AssetHub Parachain → Collectives Parachain
|
||||
its:
|
||||
- name: Alice calls hrmp.forceOpenHrmpChannel
|
||||
actions:
|
||||
- extrinsics:
|
||||
- chain: *relay_chain
|
||||
signer: *alice_signer
|
||||
sudo: true
|
||||
pallet: hrmp
|
||||
call: forceOpenHrmpChannel
|
||||
args: [
|
||||
*sp_id, # sender
|
||||
*cp_id, # recipient
|
||||
*hrmp_proposed_max_capacity, # proposedMaxCapacity
|
||||
*hrmp_proposed_max_message_size # proposedMaxMessageSize
|
||||
]
|
||||
events:
|
||||
- name: hrmp.HrmpChannelForceOpened
|
||||
result: [*sp_id, *cp_id, *hrmp_proposed_max_capacity, *hrmp_proposed_max_message_size]
|
||||
Reference in New Issue
Block a user