Skip to content

Commit

Permalink
Fix integration tests (#761)
Browse files Browse the repository at this point in the history
* feat:add cross polkadot integration tests

* Reserve code

* fix:fix polkadot-integration-tests

* fix:fix kusama-integration-tests
  • Loading branch information
hqwangningbo authored Sep 23, 2022
1 parent 953f0e5 commit c53eead
Show file tree
Hide file tree
Showing 31 changed files with 4,944 additions and 4,241 deletions.
402 changes: 134 additions & 268 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"integration-tests",
"integration-tests/bifrost-kusama",
"integration-tests/bifrost-polkadot",
"node/cli",
"node/primitives",
"node/rpc",
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ check-all: format

.PHONY: test-all # cargo test all runtime
test-all:
SKIP_WASM_BUILD= cargo test --features "with-all-runtime" --workspace --exclude runtime-integration-tests
SKIP_WASM_BUILD= cargo test --features "with-all-runtime"

.PHONY: integration-test # integration test
integration-test:
SKIP_WASM_BUILD= cargo test -p runtime-integration-tests --features=with-bifrost-kusama-runtime
SKIP_WASM_BUILD= cargo test -p *-integration-tests

.PHONY: kusama-integration-test # integration test
kusama-integration-test:
SKIP_WASM_BUILD= cargo test -p bifrost-kusama-integration-tests

.PHONY: polkadot-integration-test # integration test
polkadot-integration-test:
SKIP_WASM_BUILD= cargo test -p bifrost-polkadot-integration-tests

.PHONY: clean # cargo clean
clean:
Expand Down
213 changes: 0 additions & 213 deletions integration-tests/Cargo.toml

This file was deleted.

91 changes: 91 additions & 0 deletions integration-tests/bifrost-kusama/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[package]
name = "bifrost-kusama-integration-tests"
version = "0.8.0"
authors = ["Ron Yang <yrong1997@gmail.com>"]
edition = "2021"

[dependencies]
# third-party dependencies
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] }
log = { version = "0.4.17" }
serde = { version = "1.0.143", optional = true }
static_assertions = "1.1.0"
hex = { version = "0.4", optional = true }
hex-literal = { version = "0.3.4" }
smallvec = "1.9.0"

# primitives
node-primitives = { default-features = false, path = "../../node/primitives" }

# frame dependencies
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

# Cumulus dependencies
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }

# Polkadot dependencies
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }

# bifrost pallets
bifrost-asset-registry = { path = "../../pallets/asset-registry" }
bifrost-flexible-fee = { path = "../../pallets/flexible-fee" }
bifrost-flexible-fee-rpc-runtime-api = { path = "../../pallets/flexible-fee/rpc/runtime-api" }
bifrost-liquidity-mining = { path = "../../pallets/liquidity-mining" }
bifrost-salp = { path = "../../pallets/salp" }
bifrost-salp-rpc-runtime-api = { path = "../../pallets/salp/rpc/runtime-api" }
bifrost-slp = { path = "../../pallets/slp" }
bifrost-vsbond-auction = { path = "../../pallets/vsbond-auction" }
bifrost-vtoken-minting = { path = "../../pallets/vtoken-minting" }
pallet-vesting = { package = "bifrost-vesting", path = "../../pallets/vesting" }
bifrost-runtime-common = { path = "../../runtime/common" }
bifrost-kusama-runtime = { path = "../../runtime/bifrost-kusama" }
bifrost-polkadot-runtime = { path = "../../runtime/bifrost-polkadot" }

# orml
orml-currencies = { version = "0.4.1-dev" }
orml-tokens = { version = "0.4.1-dev" }
orml-traits = { version = "0.4.1-dev" }
orml-xtokens = { version = "0.4.1-dev" }
orml-unknown-tokens = { version = "0.4.1-dev" }
orml-xcm-support = { version = "0.4.1-dev" }

zenlink-protocol = { version = "*" }
zenlink-protocol-runtime-api = { version = "*" }

[dev-dependencies]
env_logger = "0.9.0"
hex = "0.4.0"

sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }

polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
#statemine-runtime = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator", rev = "6c02911a3eeb04c342e4eb273d2ffbedd45dabff" }
Loading

0 comments on commit c53eead

Please sign in to comment.