mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
Update SimNet test to the new format (#4051)
* simnet-v10 update simnet image version * update config * update path to js scripts * use current branch to download config for tests * use current branch to download config for tests * temp use simnet-v10 * update also the toml file * Rework test according to CIHelper format * Call cihelper script for running tests * Switch to v12 * Version 13 * simnet v14 * Readme extended Co-authored-by: Anton Gavrilov <AntonE.Gavrilov@gmail.com> Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Header":{
|
||||
"number":"u64",
|
||||
"parent_hash":"Hash",
|
||||
"post_state":"Hash"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
[settings.setup]
|
||||
timeout = 300
|
||||
|
||||
[settings.defaults]
|
||||
image = "{{get_env(name="SYNTHIMAGE") | safe }}"
|
||||
command = "polkadot"
|
||||
chain-spec = "rococo-local.json"
|
||||
chain-name = "rococo-local"
|
||||
timeout = 300
|
||||
|
||||
[init_nodes.chainspec]
|
||||
image = "{{get_env(name="SYNTHIMAGE") | safe }}"
|
||||
command = "/usr/local/bin/polkadot build-spec --chain rococo-local --disable-default-bootnode --raw > /cfg/rococo-local.json"
|
||||
fetch-files = [ "/cfg/rococo-local.json" ]
|
||||
timeout = 300
|
||||
|
||||
[init_nodes.parachain-specs]
|
||||
image = "{{get_env(name="COLIMAGE") | safe }}"
|
||||
command = """
|
||||
/usr/local/bin/adder-collator export-genesis-state > /cfg/genesis-state &&
|
||||
/usr/local/bin/adder-collator export-genesis-wasm > /cfg/genesis-wasm
|
||||
"""
|
||||
fetch-files = [ "/cfg/genesis-wasm", "/cfg/genesis-state" ]
|
||||
timeout = 300
|
||||
|
||||
[nodes.alice]
|
||||
validator = true
|
||||
image = "{{get_env(name="PARACHAINSIMAGE") | safe }}"
|
||||
command = "polkadot"
|
||||
extra-args = ["--alice"]
|
||||
|
||||
[nodes.bob]
|
||||
validator = true
|
||||
image = "{{get_env(name="PARACHAINSIMAGE") | safe }}"
|
||||
command = "polkadot"
|
||||
extra-args = ["--bob"]
|
||||
|
||||
[nodes.collator01]
|
||||
image = "{{get_env(name="COLIMAGE") | safe }}"
|
||||
command-with-args = "/usr/local/bin/adder-collator --chain /cfg/rococo-local.json --port 30333 --no-mdns --bootnodes /dns/bootnode/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"
|
||||
|
||||
[nodes.nodejs]
|
||||
image = "{{get_env(name="SCRIPTSIMAGE") | safe }}"
|
||||
command-with-args = """
|
||||
cd simnet_scripts;
|
||||
npm run build;
|
||||
node /usr/local/bin/simnet_scripts/dist/index.js register_parachain /cfg/genesis-wasm /cfg/genesis-state 100 true ws://bootnode:9944;
|
||||
tail -f /dev/null
|
||||
"""
|
||||
copy-files = [
|
||||
"genesis-state",
|
||||
"genesis-wasm",
|
||||
]
|
||||
@@ -0,0 +1,13 @@
|
||||
name = "Parachains test"
|
||||
description = "Smoke test for parachains, that deploy a simple collator and register parachain"
|
||||
required-images = [
|
||||
"SYNTHIMAGE",
|
||||
"COLIMAGE",
|
||||
"SCRIPTSIMAGE",
|
||||
"PARACHAINSIMAGE"
|
||||
]
|
||||
|
||||
[[test-cases]]
|
||||
tags = ["all", "smoketest"]
|
||||
chain-config = "configs/simple_rococo_testnet.toml"
|
||||
scenarios = ["tests/parachains.feature"]
|
||||
@@ -0,0 +1,6 @@
|
||||
Feature: ParaTesting
|
||||
|
||||
Scenario: spawn parachains network and check parachains
|
||||
Given a test network
|
||||
Then sleep 200 seconds
|
||||
Then launch 'node' with parameters '/usr/local/bin/simnet_scripts/dist/index.js test_parachain /usr/local/bin/simnet_scripts/type_defs/adder.json ws://localhost:11222 100 10'
|
||||
Reference in New Issue
Block a user