-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate simple example from Polkadot-sdk repo (#116)
In order to ensure that backward compatibility with existing node Zombienet, this PR migrates (as a start) a [simple example of a test from Polkadot-SDK](https://github.com/paritytech/polkadot-sdk/blob/0a6dfdf973b8e7b669eda6e2ed202fb3549a20b9/polkadot/zombienet_tests/smoke/0001-parachains-smoke-test.toml), and fixes some bugs in order to make the test work;
- Loading branch information
Showing
7 changed files
with
100 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[settings] | ||
timeout = 1000 | ||
|
||
[relaychain] | ||
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" | ||
chain = "rococo-local" | ||
command = "polkadot" | ||
|
||
[[relaychain.nodes]] | ||
name = "alice" | ||
args = [ "--alice", "-lruntime=debug,parachain=trace" ] | ||
|
||
[[relaychain.nodes]] | ||
name = "bob" | ||
args = [ "--bob", "-lruntime=debug,parachain=trace" ] | ||
|
||
[[parachains]] | ||
id = 100 | ||
addToGenesis = false | ||
|
||
[parachains.collator] | ||
name = "collator01" | ||
image = "{{COL_IMAGE}}" | ||
command = "adder-collator" | ||
args = [ "-lruntime=debug,parachain=trace" ] | ||
|
||
[types.Header] | ||
number = "u64" | ||
parent_hash = "Hash" | ||
post_state = "Hash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// use std::time::Duration; | ||
|
||
use configuration::NetworkConfig; | ||
use orchestrator::Orchestrator; | ||
use provider::NativeProvider; | ||
use support::fs::local::LocalFileSystem; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let config = NetworkConfig::load_from_toml("./crates/examples/examples/0001-simple.toml") | ||
.expect("errored?"); | ||
|
||
let fs = LocalFileSystem; | ||
let provider = NativeProvider::new(fs.clone()); | ||
let orchestrator = Orchestrator::new(fs, provider); | ||
orchestrator.spawn(config).await?; | ||
println!("ππππ network deployed"); | ||
// For now let just loop.... | ||
#[allow(clippy::empty_loop)] | ||
loop {} | ||
|
||
// Ok(()) | ||
} |