5a48ce4498
Uncomment dev-dependencies that were previously commented out to break circular dependencies. These dependencies are needed for tests to compile when running clippy with --all-targets --all-features. Changes include: - pezkuwi/node/*: Add pezkuwi-node-subsystem-test-helpers, pezkuwi-primitives-test-helpers - pezkuwi/xcm/*: Add pezpallet-xcm, xcm-pez-simulator - pezcumulus/client/*: Add test client, runtime, and sproof builder deps - bizinikiwi/pezframe/*: Add bizinikiwi-test-utils, pezframe-support-test, pezpallet-transaction-payment, pezpallet-example-basic, etc. - vendor/pezkuwi-zombienet-sdk: Fix imports from zombienet_sdk to pezkuwi_zombienet_sdk All runtime-benchmarks feature flags have been updated accordingly. cargo clippy --all-targets --all-features --workspace now passes.
55 lines
2.0 KiB
Rust
55 lines
2.0 KiB
Rust
use std::time::Instant;
|
|
|
|
use configuration::{NetworkConfig, NetworkConfigBuilder};
|
|
use pezkuwi_zombienet_sdk::environment::get_spawn_fn;
|
|
|
|
fn small_network() -> NetworkConfig {
|
|
NetworkConfigBuilder::new()
|
|
.with_relaychain(|r| {
|
|
r.with_chain("rococo-local")
|
|
.with_default_command("polkadot")
|
|
.with_default_image("docker.io/parity/polkadot:v1.20.2")
|
|
.with_validator(|node| node.with_name("alice"))
|
|
.with_validator(|node| node.with_name("bob"))
|
|
})
|
|
.with_parachain(|p| {
|
|
p.with_id(2000)
|
|
.cumulus_based(true)
|
|
.with_default_image("docker.io/parity/polkadot-parachain:v1.20.2")
|
|
.with_collator(|n| n.with_name("collator").with_command("polkadot-parachain"))
|
|
})
|
|
.with_parachain(|p| {
|
|
p.with_id(3000)
|
|
.cumulus_based(true)
|
|
.with_default_image("docker.io/parity/polkadot-omni-node:v1.20.2")
|
|
.with_chain_spec_runtime("https://github.com/polkadot-fellows/runtimes/releases/download/v1.9.2/asset-hub-polkadot_runtime-v1009002.compact.compressed.wasm", None)
|
|
.with_collator(|n| n.with_name("collator-omni").with_command("polkadot-omni-node"))
|
|
})
|
|
.build()
|
|
.unwrap()
|
|
}
|
|
|
|
#[tokio::test(flavor = "multi_thread")]
|
|
async fn ci_native_smoke_should_works() {
|
|
tracing_subscriber::fmt::init();
|
|
const BEST_BLOCK_METRIC: &str = "block_height{status=\"best\"}";
|
|
let now = Instant::now();
|
|
let config = small_network();
|
|
let spawn_fn = get_spawn_fn();
|
|
|
|
let network = spawn_fn(config).await.unwrap();
|
|
|
|
let elapsed = now.elapsed();
|
|
println!("🚀🚀🚀🚀 network deployed in {elapsed:.2?}");
|
|
|
|
network.wait_until_is_up(20).await.unwrap();
|
|
|
|
let elapsed = now.elapsed();
|
|
println!("✅✅✅✅ network is up in {elapsed:.2?}");
|
|
|
|
// Get a ref to the node
|
|
let alice = network.get_node("alice").unwrap();
|
|
// wait 10 blocks
|
|
alice.wait_metric(BEST_BLOCK_METRIC, |x| x > 9_f64).await.unwrap();
|
|
}
|