Skip to content

Commit

Permalink
test: add value assert tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Bell committed Nov 7, 2022
1 parent 5cd4487 commit 5257319
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tests/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[settings]
timeout = 1000

[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
extra_args = [ "-lparachain=debug" ]

[[relaychain.nodes]]
name = "charlie"
validator = true
extra_args = [ "-lparachain=debug" ]

[[parachains]]
id = 1000
add_to_genesis = true
cumulus_based = true
chain = "statemine-local"

[[parachains.collators]]
name = "statemine-collator01"
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"]

[types.Header]
number = "u64"
parent_hash = "Hash"
post_state = "Hash"
39 changes: 39 additions & 0 deletions tests/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
settings:
chains:
relay_chain: &relay_chain
wsPort: 9900
variables:
chains:
relay_chain:
alice_account: &account 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
decodedCalls: {}

tests:
- name: Tests
describes:
- name: Assert tests
its:
- name: Value increased/decreased assert tests
actions:
- queries:
balance:
chain: *relay_chain
pallet: system
call: account
args: [ *account ]
- asserts:
valueDecreased:
args: [
{
before: 1,
after: 0
}
]
valueIncreased:
args: [
{
before: 0,
after: 1
}
]

0 comments on commit 5257319

Please sign in to comment.