From e3ea582a3378b36d8552bd777da7db9bf01ad2ac Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Thu, 7 Nov 2024 13:06:47 +0000 Subject: [PATCH] fix hyperclient tests --- modules/hyperclient/src/interfaces.rs | 6 +++++- modules/hyperclient/src/testing.rs | 6 ++++++ modules/hyperclient/src/tests.rs | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/hyperclient/src/interfaces.rs b/modules/hyperclient/src/interfaces.rs index 64cc1fbfe..61782f55f 100644 --- a/modules/hyperclient/src/interfaces.rs +++ b/modules/hyperclient/src/interfaces.rs @@ -348,6 +348,7 @@ mod tests { rpc_url: "ws://127.0.0.1:9990".to_string(), consensus_state_id: [0u8; 4], hash_algo: HashAlgorithm::Keccak, + state_machine: StateMachine::Kusama(4009), }; let config = ClientConfig { source: ChainConfig::Evm(source_chain.clone()), @@ -371,7 +372,10 @@ mod tests { consensus_state_id: "ETH0".to_string(), }; - let js_hyperbridge = JsHyperbridgeConfig { rpc_url: "ws://127.0.0.1:9990".to_string() }; + let js_hyperbridge = JsHyperbridgeConfig { + rpc_url: "ws://127.0.0.1:9990".to_string(), + state_machine: "KUSAMA-4009".into(), + }; let js_client_conf = JsClientConfig { source: JsChainConfig::Evm(js_source), diff --git a/modules/hyperclient/src/testing.rs b/modules/hyperclient/src/testing.rs index 111ad38a7..fa6944c95 100644 --- a/modules/hyperclient/src/testing.rs +++ b/modules/hyperclient/src/testing.rs @@ -78,6 +78,8 @@ pub async fn subscribe_to_request_status() -> Result<(), anyhow::Error> { }; let hyperbrige_config = SubstrateConfig { + state_machine: StateMachine::Kusama(4009), + rpc_url: "wss://hyperbridge-paseo-rpc.blockops.network:443".to_string(), // rpc_url: "ws://127.0.0.1:9001".to_string(), consensus_state_id: *b"PARA", @@ -182,6 +184,8 @@ pub async fn test_timeout_request() -> Result<(), anyhow::Error> { }; let hyperbrige_config = SubstrateConfig { + state_machine: StateMachine::Kusama(4009), + rpc_url: "wss://hyperbridge-paseo-rpc.blockops.network:443".to_string(), // rpc_url: "ws://127.0.0.1:9001".to_string(), consensus_state_id: *b"PARA", @@ -361,6 +365,8 @@ pub async fn get_request_handling() -> Result<(), anyhow::Error> { }; let hyperbrige_config = SubstrateConfig { + state_machine: StateMachine::Kusama(4009), + // rpc_url: "wss://hyperbridge-paseo-rpc.blockops.network:443".to_string(), rpc_url: "ws://127.0.0.1:9001".to_string(), consensus_state_id: *b"PARA", diff --git a/modules/hyperclient/src/tests.rs b/modules/hyperclient/src/tests.rs index 1e1452541..c11bb5dd9 100644 --- a/modules/hyperclient/src/tests.rs +++ b/modules/hyperclient/src/tests.rs @@ -92,6 +92,8 @@ async fn test_query_status_from_indexer() -> Result<(), anyhow::Error> { }; let hyperbrige_config = SubstrateConfig { + state_machine: StateMachine::Kusama(4009), + rpc_url: "wss://hyperbridge-paseo-rpc.blockops.network:443".to_string(), consensus_state_id: *b"PARA", hash_algo: HashAlgorithm::Keccak, @@ -171,6 +173,8 @@ async fn test_query_response_status_from_indexer() -> Result<(), anyhow::Error> }; let hyperbrige_config = SubstrateConfig { + state_machine: StateMachine::Kusama(4009), + rpc_url: "wss://hyperbridge-paseo-rpc.blockops.network:443".to_string(), consensus_state_id: *b"PARA", hash_algo: HashAlgorithm::Keccak,