Skip to content

Commit

Permalink
chore: replace rococo to paseo name (#333)
Browse files Browse the repository at this point in the history
* chore: replace rococo to paseo name

* fix test case after change to paseo
  • Loading branch information
CocDap authored Nov 21, 2024
1 parent 6448f28 commit 258a4b2
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 80 deletions.
2 changes: 1 addition & 1 deletion crates/pop-parachains/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ mod tests {
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 4385
Expand Down
58 changes: 29 additions & 29 deletions crates/pop-parachains/src/up/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ mod tests {
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
"#
)?;
let version = "v1.12.0";
Expand Down Expand Up @@ -760,7 +760,7 @@ chain = "paseo-local"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
default_command = "./bin-v1.6.0/polkadot"
"#
)?;
Expand Down Expand Up @@ -799,7 +799,7 @@ default_command = "./bin-v1.6.0/polkadot"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[relaychain.nodes]]
name = "alice"
Expand Down Expand Up @@ -842,7 +842,7 @@ command = "polkadot"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[relaychain.nodes]]
name = "alice"
Expand Down Expand Up @@ -873,7 +873,7 @@ command = "polkadot-v1.12.0"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
default_command = "polkadot"
[[relaychain.nodes]]
Expand All @@ -900,11 +900,11 @@ command = "polkadot-v1.12.0"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 1000
chain = "asset-hub-rococo-local"
chain = "asset-hub-paseo-local"
"#
)?;
let system_parachain_version = "v1.12.0";
Expand Down Expand Up @@ -992,7 +992,7 @@ chain = "asset-hub-paseo-local"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 4385
Expand Down Expand Up @@ -1034,7 +1034,7 @@ default_command = "pop-node"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 4385
Expand Down Expand Up @@ -1076,7 +1076,7 @@ default_command = "pop-node"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 2000
Expand Down Expand Up @@ -1113,7 +1113,7 @@ default_command = "./target/release/parachain-template-node"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 2000
Expand Down Expand Up @@ -1153,7 +1153,7 @@ command = "./target/release/parachain-template-node"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 2000
Expand Down Expand Up @@ -1195,7 +1195,7 @@ default_command = "moonbeam"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
"#
Expand All @@ -1218,7 +1218,7 @@ chain = "rococo-local"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 404
Expand All @@ -1243,11 +1243,11 @@ default_command = "missing-binary"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 1000
chain = "asset-hub-rococo-local"
chain = "asset-hub-paseo-local"
[[parachains]]
id = 2000
Expand All @@ -1269,7 +1269,7 @@ default_command = "pop-node"
None,
)
.await?;
assert_eq!(zombienet.binaries().count(), 4);
assert_eq!(zombienet.binaries().count(), 6);
Ok(())
}

Expand Down Expand Up @@ -1313,7 +1313,7 @@ chain = "asset-hub-paseo-local"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
"#
)?;

Expand Down Expand Up @@ -1344,7 +1344,7 @@ chain = "rococo-local"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
"#
)?;
File::create(cache.join("polkadot"))?;
Expand Down Expand Up @@ -1381,7 +1381,7 @@ chain = "rococo-local"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
"#
)?;
let version = "v1.12.0";
Expand Down Expand Up @@ -1417,7 +1417,7 @@ chain = "rococo-local"
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[relaychain.nodes]]
name = "alice"
Expand Down Expand Up @@ -1480,15 +1480,15 @@ validator = true
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
default_command = "polkadot"
[[relaychain.nodes]]
name = "alice"
"#
)?;
let network_config = NetworkConfiguration::from(config.path())?;
let relay_chain = network_config.relay_chain()?;
assert_eq!("rococo-local", relay_chain["chain"].as_str().unwrap());
assert_eq!("paseo-local", relay_chain["chain"].as_str().unwrap());
assert_eq!(
"polkadot",
NetworkConfiguration::default_command(relay_chain).unwrap().as_str().unwrap()
Expand All @@ -1506,7 +1506,7 @@ validator = true
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[parachains]]
id = 2000
default_command = "node"
Expand All @@ -1530,15 +1530,15 @@ validator = true
config.as_file(),
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
[[relaychain.nodes]]
name = "alice"
command = "polkadot"
[[parachains]]
id = 1000
chain = "asset-hub-rococo-local"
chain = "asset-hub-paseo-local"
[[parachains.collators]]
name = "asset-hub"
Expand Down Expand Up @@ -1585,7 +1585,7 @@ command = "./target/release/parachain-template-node"
manifest: None,
},
workers: ["polkadot-execute-worker", ""],
chain: "rococo-local".to_string(),
chain: "paseo-local".to_string(),
chain_spec_generator: None,
},
&[
Expand Down Expand Up @@ -1641,7 +1641,7 @@ command = "./target/release/parachain-template-node"
format!(
r#"
[relaychain]
chain = "rococo-local"
chain = "paseo-local"
default_command = "{0}"
[[relaychain.nodes]]
Expand All @@ -1650,7 +1650,7 @@ command = "{0}"
[[parachains]]
id = 1000
chain = "asset-hub-rococo-local"
chain = "asset-hub-paseo-local"
default_command = "{1}"
[[parachains.collators]]
Expand Down
2 changes: 1 addition & 1 deletion crates/pop-parachains/src/up/parachains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ mod tests {
None,
None,
"v1.12.0",
Some("asset-hub-rococo-local"),
Some("asset-hub-paseo-local"),
tempdir()?.path()
)
.await?
Expand Down
2 changes: 1 addition & 1 deletion crates/pop-parachains/src/up/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub(super) async fn from(
source: TryInto::try_into(&relay, tag, latest)?,
cache: cache.to_path_buf(),
};
let chain = chain.unwrap_or("rococo-local");
let chain = chain.unwrap_or("paseo-local");
return Ok(super::RelayChain {
binary,
workers: relay.workers(),
Expand Down
4 changes: 2 additions & 2 deletions crates/pop-parachains/templates/base/chain_spec.templ
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn development_config() -> ChainSpec {
ChainSpec::builder(
runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
Extensions {
relay_chain: "rococo-local".into(),
relay_chain: "paseo-local".into(),
// You MUST set this to the correct network!
para_id: 2000,
},
Expand Down Expand Up @@ -123,7 +123,7 @@ pub fn local_testnet_config() -> ChainSpec {
ChainSpec::builder(
runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
Extensions {
relay_chain: "rococo-local".into(),
relay_chain: "paseo-local".into(),
// You MUST set this to the correct network!
para_id: 2000,
},
Expand Down
2 changes: 1 addition & 1 deletion crates/pop-parachains/templates/base/network.templ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[relaychain]
chain = "rococo-local"
chain = "paseo-local"

[[relaychain.nodes]]
name = "alice"
Expand Down
30 changes: 3 additions & 27 deletions crates/pop-parachains/tests/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,37 +102,13 @@ async fn launch_polkadot_and_system_parachain() -> Result<()> {
}

#[tokio::test]
async fn launch_rococo() -> Result<()> {
async fn launch_paseo_and_system_parachain() -> Result<()> {
let temp_dir = tempfile::tempdir()?;
let cache = temp_dir.path().to_path_buf();

let mut zombienet = Zombienet::new(
&cache,
"../../tests/networks/rococo.toml",
Some(BINARY_VERSION),
None,
None,
None,
None,
)
.await?;

for binary in zombienet.binaries().filter(|b| !b.exists()) {
binary.source(true, &(), true).await?;
}

zombienet.spawn().await?;
Ok(())
}

#[tokio::test]
async fn launch_rococo_and_system_parachain() -> Result<()> {
let temp_dir = tempfile::tempdir()?;
let cache = temp_dir.path().to_path_buf();

let mut zombienet = Zombienet::new(
&cache,
"../../tests/networks/rococo+coretime.toml",
"../../tests/networks/paseo+coretime.toml",
Some(BINARY_VERSION),
None,
Some(BINARY_VERSION),
Expand All @@ -150,7 +126,7 @@ async fn launch_rococo_and_system_parachain() -> Result<()> {
}

#[tokio::test]
async fn launch_rococo_and_two_parachains() -> Result<()> {
async fn launch_paseo_and_two_parachains() -> Result<()> {
let temp_dir = tempfile::tempdir()?;
let cache = temp_dir.path().to_path_buf();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pop up parachain -f ./tests/networks/rococo+coretime.toml
# pop up parachain -f ./tests/networks/paseo+coretime.toml

[relaychain]
chain = "rococo-local"
chain = "paseo-local"

[[relaychain.nodes]]
name = "alice"
Expand All @@ -13,7 +13,7 @@ validator = true

[[parachains]]
id = 1005
chain = "coretime-rococo-local"
chain = "coretime-paseo-local"

[[parachains.collators]]
name = "coretime-01"
4 changes: 2 additions & 2 deletions tests/networks/pop.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pop up parachain -f ./tests/networks/pop.toml

[relaychain]
chain = "rococo-local"
chain = "paseo-local"

[[relaychain.nodes]]
name = "alice"
Expand All @@ -13,7 +13,7 @@ validator = true

[[parachains]]
id = 1000
chain = "asset-hub-rococo-local"
chain = "asset-hub-paseo-local"

[[parachains.collators]]
name = "asset-hub"
Expand Down
Loading

0 comments on commit 258a4b2

Please sign in to comment.