diff --git a/src/tracker/mod.rs b/src/tracker/mod.rs index fbda95354..e8071b501 100644 --- a/src/tracker/mod.rs +++ b/src/tracker/mod.rs @@ -25,6 +25,8 @@ use crate::databases::driver::Driver; use crate::databases::{self, Database}; use crate::protocol::info_hash::InfoHash; +// force build + pub struct Tracker { pub config: Arc, mode: mode::Mode, diff --git a/tests/tracker_api.rs b/tests/api/integrations_tests.rs similarity index 99% rename from tests/tracker_api.rs rename to tests/api/integrations_tests.rs index bec22e2b4..566ab00de 100644 --- a/tests/tracker_api.rs +++ b/tests/api/integrations_tests.rs @@ -3,11 +3,6 @@ /// ```text /// cargo test tracker_apis -- --nocapture /// ``` -extern crate rand; - -mod api; -mod common; - mod tracker_apis { use crate::common::fixtures::invalid_info_hashes; diff --git a/tests/api/mod.rs b/tests/api/mod.rs index 8dd6f4c53..4b3b4119d 100644 --- a/tests/api/mod.rs +++ b/tests/api/mod.rs @@ -6,6 +6,7 @@ pub mod asserts; pub mod client; pub mod connection_info; pub mod server; +pub mod integrations_tests; /// It forces a database error by dropping all tables. /// That makes any query fail. diff --git a/tests/http_tracker.rs b/tests/http/integration_tests.rs similarity index 99% rename from tests/http_tracker.rs rename to tests/http/integration_tests.rs index 2360df9ab..99d573d2e 100644 --- a/tests/http_tracker.rs +++ b/tests/http/integration_tests.rs @@ -9,9 +9,6 @@ /// ```text /// cargo test `warp_http_tracker_server` -- --nocapture /// ``` -mod common; -mod http; - mod warp_http_tracker_server { mod for_all_config_modes { diff --git a/tests/http/mod.rs b/tests/http/mod.rs index 40616025b..79b5d7acd 100644 --- a/tests/http/mod.rs +++ b/tests/http/mod.rs @@ -5,6 +5,7 @@ pub mod connection_info; pub mod requests; pub mod responses; pub mod server; +pub mod integration_tests; use percent_encoding::NON_ALPHANUMERIC; diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs new file mode 100644 index 000000000..a62f38bcf --- /dev/null +++ b/tests/integration_tests.rs @@ -0,0 +1,6 @@ +extern crate rand; + +mod api; +mod common; +mod http; +mod udp; diff --git a/tests/udp_tracker.rs b/tests/udp/integration_tests.rs similarity index 97% rename from tests/udp_tracker.rs rename to tests/udp/integration_tests.rs index 0287d01b7..f46693a05 100644 --- a/tests/udp_tracker.rs +++ b/tests/udp/integration_tests.rs @@ -1,11 +1,6 @@ /// Integration tests for UDP tracker server /// /// cargo test `udp_tracker_server` -- --nocapture -extern crate rand; - -mod common; -mod udp; - mod udp_tracker_server { // UDP tracker documentation: @@ -97,8 +92,8 @@ mod udp_tracker_server { use crate::udp::asserts::is_ipv4_announce_response; use crate::udp::client::new_udp_tracker_client_connected; + use crate::udp::integration_tests::udp_tracker_server::send_connection_request; use crate::udp::server::{start_udp_tracker, tracker_configuration}; - use crate::udp_tracker_server::send_connection_request; #[tokio::test] async fn should_return_an_announce_response() { @@ -140,8 +135,8 @@ mod udp_tracker_server { use crate::udp::asserts::is_scrape_response; use crate::udp::client::new_udp_tracker_client_connected; + use crate::udp::integration_tests::udp_tracker_server::send_connection_request; use crate::udp::server::{start_udp_tracker, tracker_configuration}; - use crate::udp_tracker_server::send_connection_request; #[tokio::test] async fn should_return_a_scrape_response() { diff --git a/tests/udp/mod.rs b/tests/udp/mod.rs index 16a77bb99..834ba18b0 100644 --- a/tests/udp/mod.rs +++ b/tests/udp/mod.rs @@ -1,3 +1,4 @@ pub mod asserts; pub mod client; pub mod server; +pub mod integration_tests;