From a3304e8ad870ec3e598a656a7935f560556feb3d Mon Sep 17 00:00:00 2001 From: Vova Lando Date: Mon, 27 May 2024 23:08:39 +0300 Subject: [PATCH] test progress state --- chopsticks/pd-ah.yml | 2 +- configs/chopsticks.toml | 2 +- tests/integration_tests.rs | 13 ++++--------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/chopsticks/pd-ah.yml b/chopsticks/pd-ah.yml index 8e28c18..bbdb482 100644 --- a/chopsticks/pd-ah.yml +++ b/chopsticks/pd-ah.yml @@ -1,4 +1,4 @@ -endpoint: wss://polkadot-asset-hub-rpc.polkadot.io +endpoint: wss://statemint.api.onfinality.io/public-ws import-storage: System: diff --git a/configs/chopsticks.toml b/configs/chopsticks.toml index d0fe099..e832b2b 100644 --- a/configs/chopsticks.toml +++ b/configs/chopsticks.toml @@ -4,7 +4,7 @@ debug = true in-memory-db = true [[chain]] -name = "chop-assethub-polkadot" +name = "statemint" endpoints = [ "ws://localhost:8000" ] diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index e90cf71..3f725a3 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1,3 +1,4 @@ +// ensure you have chopsticks installed: npm install -g @acala-network/chopsticks // if running locally, ensure that you have no dangling processes (kalatori daemon, chopsticks) // pkill -f kalatori; pkill -f chopsticks @@ -16,13 +17,9 @@ lazy_static! { async fn start_chopsticks() -> std::io::Result { let mut command = Command::new("npx"); - command.args(&[ - "@acala-network/chopsticks@latest", - "-c", - "chopsticks/pd-ah.yml", - ]); + command.args(&["@acala-network/chopsticks@latest", "-c", "chopsticks/pd-ah.yml"]); let chopsticks = command.spawn()?; - sleep(Duration::from_secs(3)).await; // Give Chopsticks some time to start + sleep(Duration::from_secs(10)).await; // Give Chopsticks some time to start Ok(chopsticks) } @@ -54,7 +51,7 @@ fn load_chain_config() { async fn start_daemon() -> std::io::Result { let daemon = Command::new("target/debug/kalatori").spawn()?; - sleep(Duration::from_secs(3)).await; // Give the daemon some time to start + sleep(Duration::from_secs(10)).await; // Give the daemon some time to start Ok(daemon) } @@ -143,8 +140,6 @@ async fn test_daemon_status_call() { assert_eq!(properties.decimals, 10); assert_eq!(properties.rpc_url, "ws://localhost:8000"); // those are wrong atm - assert!(properties.asset_id.is_none()); - assert_eq!(properties.ss58, 0); } }