From 00c4b781491f976a598fe6c9636241788428e13c Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Tue, 26 Mar 2024 18:08:13 +0200 Subject: [PATCH] testing: Remove old lightclient object Signed-off-by: Alexandru Vasile --- Cargo.lock | 20 ++++++++++++++++++- .../integration-tests/src/utils/context.rs | 11 +--------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f374c7f25a..bb5e10fc68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -758,6 +758,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" + [[package]] name = "chacha20" version = "0.9.1" @@ -2259,6 +2265,7 @@ name = "integration-tests" version = "0.35.0" dependencies = [ "assert_matches", + "cfg_aliases", "frame-metadata 16.0.0", "futures", "hex", @@ -2272,6 +2279,7 @@ dependencies = [ "subxt-codegen", "subxt-metadata", "subxt-signer", + "subxt-test-proc-macro", "syn 2.0.53", "test-runtime", "tokio", @@ -2816,7 +2824,7 @@ checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" dependencies = [ "bitcoin_hashes 0.13.0", "rand", - "rand_core 0.5.1", + "rand_core 0.6.4", "serde", "unicode-normalization", ] @@ -4649,6 +4657,7 @@ dependencies = [ "tracing", "tracing-subscriber 0.3.18", "url", + "wasm-bindgen-futures", ] [[package]] @@ -4777,6 +4786,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "subxt-test-proc-macro" +version = "0.35.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + [[package]] name = "syn" version = "1.0.109" diff --git a/testing/integration-tests/src/utils/context.rs b/testing/integration-tests/src/utils/context.rs index 2ad0d8edfb..e987763eb3 100644 --- a/testing/integration-tests/src/utils/context.rs +++ b/testing/integration-tests/src/utils/context.rs @@ -4,13 +4,8 @@ pub(crate) use crate::{node_runtime, utils::TestNodeProcess}; -use subxt::SubstrateConfig; - -#[cfg(lightclient)] -use subxt::client::LightClient; - -#[cfg(fullclient)] use subxt::client::OnlineClient; +use subxt::SubstrateConfig; /// `substrate-node` should be installed on the $PATH. We fall back /// to also checking for an older `substrate` binary. @@ -30,12 +25,8 @@ pub type TestConfig = SubstrateConfig; pub type TestContext = TestNodeProcess; -#[cfg(fullclient)] pub type TestClient = OnlineClient; -#[cfg(lightclient)] -pub type TestClient = LightClient; - pub async fn test_context() -> TestContext { test_context_with("alice".to_string()).await }