Skip to content

Commit

Permalink
chore(starknet_infra_utils): move fn from integration test
Browse files Browse the repository at this point in the history
commit-id:81ec4ffa
  • Loading branch information
Itay-Tsabary-Starkware committed Jan 15, 2025
1 parent 5988c71 commit 0da5cb3
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/starknet_infra_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license-file.workspace = true
description = "Infrastructure utility."

[features]
testing = []
testing = ["tokio/net"]

[lints]
workspace = true
Expand Down
2 changes: 2 additions & 0 deletions crates/starknet_infra_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ pub mod run_until;
pub mod tasks;
#[cfg(any(feature = "testing", test))]
pub mod test_identifiers;
#[cfg(any(feature = "testing", test))]
pub mod test_utils;
pub mod tracing;
pub mod type_name;
2 changes: 1 addition & 1 deletion crates/starknet_integration_tests/src/flow_test_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ use starknet_consensus_manager::config::ConsensusManagerConfig;
use starknet_gateway_types::errors::GatewaySpecError;
use starknet_http_server::config::HttpServerConfig;
use starknet_http_server::test_utils::HttpTestClient;
use starknet_infra_utils::test_utils::AvailablePorts;
use starknet_mempool_p2p::config::MempoolP2pConfig;
use starknet_monitoring_endpoint::config::MonitoringEndpointConfig;
use starknet_monitoring_endpoint::test_utils::MonitoringClient;
use starknet_sequencer_infra::test_utils::AvailablePorts;
use starknet_sequencer_node::config::component_config::ComponentConfig;
use starknet_sequencer_node::config::node_config::SequencerNodeConfig;
use starknet_sequencer_node::servers::run_component_servers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use starknet_api::transaction::TransactionHash;
use starknet_consensus_manager::config::ConsensusManagerConfig;
use starknet_http_server::config::HttpServerConfig;
use starknet_http_server::test_utils::HttpTestClient;
use starknet_infra_utils::test_utils::AvailablePorts;
use starknet_mempool_p2p::config::MempoolP2pConfig;
use starknet_monitoring_endpoint::config::MonitoringEndpointConfig;
use starknet_monitoring_endpoint::test_utils::MonitoringClient;
use starknet_sequencer_infra::test_utils::AvailablePorts;
use starknet_sequencer_node::config::component_config::ComponentConfig;
use starknet_sequencer_node::test_utils::node_runner::NodeRunner;
use starknet_state_sync::config::StateSyncConfig;
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet_integration_tests/src/sequencer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use starknet_api::state::StateNumber;
use starknet_api::transaction::TransactionHash;
use starknet_infra_utils::run_until::run_until;
use starknet_infra_utils::test_identifiers::TestIdentifier;
use starknet_infra_utils::test_utils::{AvailablePorts, MAX_NUMBER_OF_INSTANCES_PER_TEST};
use starknet_infra_utils::tracing::{CustomLogger, TraceLevel};
use starknet_sequencer_infra::test_utils::{AvailablePorts, MAX_NUMBER_OF_INSTANCES_PER_TEST};
use starknet_sequencer_node::config::component_config::ComponentConfig;
use starknet_sequencer_node::config::component_execution_config::{
ActiveComponentExecutionConfig,
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet_integration_tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ use starknet_gateway::config::{
StatelessTransactionValidatorConfig,
};
use starknet_http_server::test_utils::create_http_server_config;
use starknet_infra_utils::test_utils::AvailablePorts;
use starknet_mempool_p2p::config::MempoolP2pConfig;
use starknet_monitoring_endpoint::config::MonitoringEndpointConfig;
use starknet_sequencer_infra::test_utils::AvailablePorts;
use starknet_sequencer_node::config::component_config::ComponentConfig;
use starknet_sequencer_node::config::config_utils::{
EthereumBaseLayerConfigRequiredParams,
Expand Down
1 change: 1 addition & 0 deletions crates/starknet_sequencer_infra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ validator.workspace = true
assert_matches.workspace = true
pretty_assertions.workspace = true
starknet-types-core.workspace = true
starknet_infra_utils = { workspace = true, features = ["testing"] }
2 changes: 0 additions & 2 deletions crates/starknet_sequencer_infra/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ pub mod component_definitions;
pub mod component_server;
pub mod errors;
pub mod serde_utils;
#[cfg(any(feature = "testing", test))]
pub mod test_utils;
#[cfg(test)]
pub mod tests;
pub mod trace_util;
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use hyper::{Body, Client, Request, Response, Server, StatusCode, Uri};
use rstest::rstest;
use serde::de::DeserializeOwned;
use serde::Serialize;
use starknet_infra_utils::test_utils::get_available_socket;
use starknet_types_core::felt::Felt;
use tokio::sync::mpsc::channel;
use tokio::sync::Mutex;
Expand All @@ -34,7 +35,6 @@ use crate::component_server::{
RemoteComponentServer,
};
use crate::serde_utils::SerdeWrapper;
use crate::test_utils::get_available_socket;
use crate::tests::{
test_a_b_functionality,
ComponentA,
Expand Down

0 comments on commit 0da5cb3

Please sign in to comment.