Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Example Parachain Integration tests #87

Merged
merged 6 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions integration-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[`parachains-integration-tests`](https://github.com/paritytech/parachains-integration-tests) is a tool designed to test interactions between Substrate based blockchains.

Is used here to develop tests rapidly describing them in a YAML file.

# Setup

Install `parachains-integration-tests` into your system:
```
$ yarn global add ts-node

$ yarn global add @parity/parachains-integration-tests
```

Review the [Run a local network](https://github.com/paritytech/extended-parachain-template#%EF%B8%8F-run-a-local-network) to set up Zombienet in your system.

Create a `bin` directory into the root of this repository and place the following binaries inside of it:
- `polkadot` (which you can download from [the releases](https://github.com/paritytech/polkadot/releases))
AlexD10S marked this conversation as resolved.
Show resolved Hide resolved
- `polkadot-parachain` (which you will build from [cumulus](https://github.com/paritytech/cumulus))

Use the following command in the root of this repository to build the node:

```sh
cargo build --release
```

# Usage

Please refer to the [project's `README.md`](https://github.com/paritytech/parachains-integration-tests#how-to-use) for an extensive description of how to write YAML test files and how to execute tests.


69 changes: 69 additions & 0 deletions zombienet-config/integration-tests-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[relaychain]
chain = "rococo-local"
default_command = "./bin/polkadot"

[[relaychain.nodes]]
name = "alice"
validator = true
ws_port = 9900
extra_args = [ "-lparachain=debug" ]

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

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

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

[[parachains]]
id = 1000
add_to_genesis = true
cumulus_based = true
chain = "statemine-local"
stiiifff marked this conversation as resolved.
Show resolved Hide resolved

[[parachains.collators]]
name = "statemine-collator01"
stiiifff marked this conversation as resolved.
Show resolved Hide resolved
command = "./bin/polkadot-parachain"
ws_port = 9910
args = ["--log=xcm=trace,pallet-assets=trace"]

[[parachains.collators]]
name = "statemine-collator02"
command = "./bin/polkadot-parachain"
ws_port = 9911
args = ["--log=xcm=trace,pallet-assets=trace"]

[[parachains]]
id = 2000
addToGenesis = true
cumulus_based = true

[[parachains.collators]]
name = "parachain-collator01"
command = "./target/release/parachain-template-node"
ws_port = 9920
args = ["--log=xcm=trace,pallet-assets=trace"]

[[parachains.collators]]
name = "parachain-collator02"
command = "./target/release/parachain-template-node"
ws_port = 9921
args = ["--log=xcm=trace,pallet-assets=trace"]


[[hrmp_channels]]
sender = 1000
recipient = 2000
max_capacity = 8
max_message_size = 512

[[hrmp_channels]]
sender = 2000
recipient = 1000
max_capacity = 8
max_message_size = 512