diff --git a/crates/tests-integration/src/integration_test_setup.rs b/crates/tests-integration/src/integration_test_setup.rs index 0cb1a95da5e..1cdda80fb9f 100644 --- a/crates/tests-integration/src/integration_test_setup.rs +++ b/crates/tests-integration/src/integration_test_setup.rs @@ -14,13 +14,13 @@ use starknet_task_executor::tokio_executor::TokioExecutor; use tokio::runtime::Handle; use tokio::task::JoinHandle; -use crate::integration_test_utils::{create_config, GatewayClient}; +use crate::integration_test_utils::{create_config, HttpTestClient}; use crate::mock_batcher::MockBatcher; use crate::state_reader::spawn_test_rpc_state_reader; pub struct IntegrationTestSetup { pub task_executor: TokioExecutor, - pub gateway_client: GatewayClient, + pub http_test_client: HttpTestClient, pub batcher: MockBatcher, pub gateway_handle: JoinHandle<()>, pub mempool_handle: JoinHandle<()>, @@ -52,7 +52,7 @@ impl IntegrationTestSetup { let (clients, servers) = create_clients_servers_from_config(&config); let GatewayNetworkConfig { ip, port } = config.gateway_config.network_config; - let gateway_client = GatewayClient::new(SocketAddr::from((ip, port))); + let http_test_client = HttpTestClient::new(SocketAddr::from((ip, port))); let gateway_future = get_server_future("Gateway", true, servers.gateway); let gateway_handle = task_executor.spawn_with_handle(gateway_future); @@ -69,15 +69,15 @@ impl IntegrationTestSetup { let mempool_future = get_server_future("Mempool", true, servers.mempool); let mempool_handle = task_executor.spawn_with_handle(mempool_future); - Self { task_executor, gateway_client, batcher, gateway_handle, mempool_handle } + Self { task_executor, http_test_client, batcher, gateway_handle, mempool_handle } } pub async fn assert_add_tx_success(&self, tx: &RpcTransaction) -> TransactionHash { - self.gateway_client.assert_add_tx_success(tx).await + self.http_test_client.assert_add_tx_success(tx).await } pub async fn assert_add_tx_error(&self, tx: &RpcTransaction) -> GatewaySpecError { - self.gateway_client.assert_add_tx_error(tx).await + self.http_test_client.assert_add_tx_error(tx).await } pub async fn get_txs(&self, n_txs: usize) -> Vec { diff --git a/crates/tests-integration/src/integration_test_utils.rs b/crates/tests-integration/src/integration_test_utils.rs index 1905b68dda0..3840bac1a9a 100644 --- a/crates/tests-integration/src/integration_test_utils.rs +++ b/crates/tests-integration/src/integration_test_utils.rs @@ -43,13 +43,13 @@ pub async fn create_config(rpc_server_addr: SocketAddr) -> MempoolNodeConfig { MempoolNodeConfig { gateway_config, rpc_state_reader_config, ..MempoolNodeConfig::default() } } -/// A test utility client for interacting with a gateway server. -pub struct GatewayClient { +/// A test utility client for interacting with an http server. +pub struct HttpTestClient { socket: SocketAddr, client: Client, } -impl GatewayClient { +impl HttpTestClient { pub fn new(socket: SocketAddr) -> Self { let client = Client::new(); Self { socket, client }