Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Update integration tests (#1715)
Browse files Browse the repository at this point in the history
* update it

* [ci] Apply cargo-fmt

Co-authored-by: paritytech-ci <paritytech-ci@parity.io>
  • Loading branch information
NachoPal and paritytech-ci authored Oct 3, 2022
1 parent de63130 commit 2bac213
Show file tree
Hide file tree
Showing 13 changed files with 310 additions and 299 deletions.
3 changes: 2 additions & 1 deletion pallets/parachain-system/src/validate_block/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ fn check_inherents_are_unsigned_and_before_all_other_extrinsics() {
.expect("Runs the test");
assert!(output.status.success());

assert!(String::from_utf8(output.stderr).unwrap()
assert!(String::from_utf8(output.stderr)
.unwrap()
.contains("Could not find `set_validation_data` inherent"));
}
}
5 changes: 5 additions & 0 deletions parachains/integration-tests/statemine/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ chain = "kusama-local"

[[relaychain.nodes]]
name = "bob"
ws_port = 9901
validator = true

[[relaychain.nodes]]
name = "charlie"
ws_port = 9902
validator = true

[[relaychain.nodes]]
name = "dave"
ws_port = 9903
validator = true

[[parachains]]
Expand All @@ -32,6 +35,7 @@ cumulus_based = true

[[parachains.collators]]
name = "collator2"
ws_port = 9911
command = "./bin/polkadot-parachain"

[[parachains]]
Expand All @@ -46,4 +50,5 @@ cumulus_based = true

[[parachains.collators]]
name = "collator4"
ws_port = 9921
command = "./bin/polkadot-parachain"
48 changes: 24 additions & 24 deletions parachains/integration-tests/statemine/xcm/0_init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: xcmPallet.SupportedVersionChanged
attribute:
type: u32
value: *xcm_version
attributes:
- type: u32
value: *xcm_version
- extrinsics: # Relay Chain sets supported version for Penpal Parachain
- chain: *relay_chain
sudo: true
Expand All @@ -82,13 +82,13 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: xcmPallet.SupportedVersionChanged
attribute:
type: u32
value: *xcm_version
attributes:
- type: u32
value: *xcm_version
- extrinsics: # Assset Parachain sets supported version for Relay Chain through it
- chain: *relay_chain
signer: *rc_signer
Expand All @@ -111,15 +111,15 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: xcmPallet.Sent
- name: polkadotXcm.SupportedVersionChanged
chain: *assets_parachain
attribute:
type: u32
value: *xcm_version
attributes:
- type: u32
value: *xcm_version
- extrinsics: # Penpal Parachain sets supported version for Relay Chain
- chain: *penpal_parachain
signer: *pp_signer
Expand All @@ -135,10 +135,10 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: polkadotXcm.SupportedVersionChanged
attribute:
type: u32
value: *xcm_version
attributes:
- type: u32
value: *xcm_version
50 changes: 25 additions & 25 deletions parachains/integration-tests/statemine/xcm/1_dmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ tests:
]
events:
- name: xcmPallet.Attempted
attribute:
type: XcmV2TraitsOutcome
isComplete: true
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attribute:
type: XcmV2TraitsOutcome
isComplete: true
threshold: [10, 10]
value: 1,021,973,000
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 1,021,973,000
- queries:
balance_rc_sender_after:
chain: *relay_chain
Expand Down Expand Up @@ -146,11 +146,11 @@ tests:
- name: xcmPallet.Sent
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attribute:
type: XcmV2TraitsOutcome
isComplete: true
threshold: [10, 10]
value: 1,021,258,000
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 1,021,258,000
- queries:
forced_created_asset:
chain: *assets_parachain
Expand Down Expand Up @@ -186,9 +186,9 @@ tests:
]
events:
- name: system.ExtrinsicFailed
attribute:
type: SpRuntimeDispatchError
value: BadOrigin
attributes:
- type: SpRuntimeDispatchError
value: BadOrigin

- name: xcmPallet.limitedReserveTransferAssets
before: *before_get_balances
Expand All @@ -209,17 +209,17 @@ tests:
]
events:
- name: xcmPallet.Attempted
attribute:
type: XcmV2TraitsOutcome
isComplete: true
threshold: [10, 10]
value: 750,645,000
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 750,645,000
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attribute:
type: XcmV2TraitsOutcome
isError: true
value: "WeightNotComputable"
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Error
value: "WeightNotComputable"
- queries:
balance_rc_sender_after:
chain: *relay_chain
Expand Down
50 changes: 25 additions & 25 deletions parachains/integration-tests/statemine/xcm/2_ump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ tests:
]
events:
- name: xcmPallet.Attempted
attribute:
type: XcmV2TraitsOutcome
isComplete: true
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attribute:
type: XcmV2TraitsOutcome
isComplete: true
threshold: [10, 10]
value: 1,021,973,000
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 1,021,973,000

- name: Get the balances of the Assets Parachain's sender & Relay Chain's receiver
actions:
Expand Down Expand Up @@ -95,18 +95,18 @@ tests:
]
events:
- name: polkadotXcm.Attempted
attribute:
type: XcmV2TraitsOutcome
isComplete: true
threshold: [10, 10]
value: 360,315,000
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 360,315,000
- name: ump.ExecutedUpward
chain: *relay_chain
attribute:
type: XcmV2TraitsOutcome
isComplete: true
threshold: [10, 10]
value: 297,578,000
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 297,578,000
- queries:
balance_ap_sender_after:
chain: *assets_parachain
Expand Down Expand Up @@ -171,9 +171,9 @@ tests:
]
events:
- name: system.ExtrinsicFailed
attribute:
type: SpRuntimeDispatchError
value: BadOrigin
attributes:
- type: SpRuntimeDispatchError
value: BadOrigin

- name: polkadotXcm.limitedReserveTransferAssets
its:
Expand All @@ -193,7 +193,7 @@ tests:
]
events:
- name: polkadotXcm.Attempted
attribute:
type: XcmV2TraitsOutcome
isError: true
value: Barrier
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Error
value: Barrier
Loading

0 comments on commit 2bac213

Please sign in to comment.