diff --git a/tests/common/tracker.rs b/tests/common/app.rs similarity index 72% rename from tests/common/tracker.rs rename to tests/common/app.rs index d95573702..132faeb06 100644 --- a/tests/common/tracker.rs +++ b/tests/common/app.rs @@ -4,7 +4,7 @@ use torrust_tracker::bootstrap; use torrust_tracker::tracker::services::tracker_factory; use torrust_tracker::tracker::Tracker; -pub fn new_tracker(configuration: Arc) -> Arc { +pub fn setup_with_config(configuration: Arc) -> Arc { bootstrap::app::initialize_static(); bootstrap::logging::setup(&configuration); diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 9452cc111..efb53b337 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -1,4 +1,4 @@ pub mod fixtures; pub mod http; -pub mod tracker; +pub mod app; pub mod udp; diff --git a/tests/servers/api/test_environment.rs b/tests/servers/api/test_environment.rs index c9b693320..be767f05e 100644 --- a/tests/servers/api/test_environment.rs +++ b/tests/servers/api/test_environment.rs @@ -6,7 +6,7 @@ use torrust_tracker::tracker::peer::Peer; use torrust_tracker::tracker::Tracker; use super::connection_info::ConnectionInfo; -use crate::common::tracker::new_tracker; +use crate::common::app::setup_with_config; #[allow(clippy::module_name_repetitions, dead_code)] pub type StoppedTestEnvironment = TestEnvironment; @@ -39,7 +39,7 @@ impl TestEnvironment { pub fn new_stopped(cfg: torrust_tracker_configuration::Configuration) -> Self { let cfg = Arc::new(cfg); - let tracker = new_tracker(cfg.clone()); + let tracker = setup_with_config(cfg.clone()); let api_server = api_server(cfg.http_api.clone()); diff --git a/tests/servers/http/test_environment.rs b/tests/servers/http/test_environment.rs index e6013540d..a1b3444dd 100644 --- a/tests/servers/http/test_environment.rs +++ b/tests/servers/http/test_environment.rs @@ -5,7 +5,7 @@ use torrust_tracker::shared::bit_torrent::info_hash::InfoHash; use torrust_tracker::tracker::peer::Peer; use torrust_tracker::tracker::Tracker; -use crate::common::tracker::new_tracker; +use crate::common::app::setup_with_config; #[allow(clippy::module_name_repetitions, dead_code)] pub type StoppedTestEnvironment = TestEnvironment>; @@ -39,7 +39,7 @@ impl TestEnvironment> { pub fn new_stopped(cfg: torrust_tracker_configuration::Configuration) -> Self { let cfg = Arc::new(cfg); - let tracker = new_tracker(cfg.clone()); + let tracker = setup_with_config(cfg.clone()); let http_server = http_server(cfg.http_trackers[0].clone()); diff --git a/tests/servers/udp/test_environment.rs b/tests/servers/udp/test_environment.rs index c9f67c987..fdbb9036d 100644 --- a/tests/servers/udp/test_environment.rs +++ b/tests/servers/udp/test_environment.rs @@ -6,7 +6,7 @@ use torrust_tracker::shared::bit_torrent::info_hash::InfoHash; use torrust_tracker::tracker::peer::Peer; use torrust_tracker::tracker::Tracker; -use crate::common::tracker::new_tracker; +use crate::common::app::setup_with_config; #[allow(clippy::module_name_repetitions, dead_code)] pub type StoppedTestEnvironment = TestEnvironment; @@ -41,7 +41,7 @@ impl TestEnvironment { pub fn new_stopped(cfg: torrust_tracker_configuration::Configuration) -> Self { let cfg = Arc::new(cfg); - let tracker = new_tracker(cfg.clone()); + let tracker = setup_with_config(cfg.clone()); let udp_server = udp_server(cfg.udp_trackers[0].clone());