moved tests to subdirs

This commit is contained in:
David Osipov 2026-03-20 22:55:19 +04:00
parent 0eca535955
commit 43d7e6e991
No known key found for this signature in database
GPG Key ID: 0E55C4A47454E82E
54 changed files with 40 additions and 33 deletions

View File

@ -992,11 +992,11 @@ impl ProxyConfig {
} }
#[cfg(test)] #[cfg(test)]
#[path = "load_idle_policy_tests.rs"] #[path = "tests/load_idle_policy_tests.rs"]
mod load_idle_policy_tests; mod load_idle_policy_tests;
#[cfg(test)] #[cfg(test)]
#[path = "load_security_tests.rs"] #[path = "tests/load_security_tests.rs"]
mod load_security_tests; mod load_security_tests;
#[cfg(test)] #[cfg(test)]

View File

@ -7,6 +7,7 @@ mod crypto;
mod error; mod error;
mod ip_tracker; mod ip_tracker;
#[cfg(test)] #[cfg(test)]
#[path = "tests/ip_tracker_regression_tests.rs"]
mod ip_tracker_regression_tests; mod ip_tracker_regression_tests;
mod maestro; mod maestro;
mod metrics; mod metrics;

View File

@ -339,7 +339,7 @@ pub mod rpc_flags {
pub const ME_HANDSHAKE_TIMEOUT_SECS: u64 = 10; pub const ME_HANDSHAKE_TIMEOUT_SECS: u64 = 10;
#[cfg(test)] #[cfg(test)]
#[path = "tls_size_constants_security_tests.rs"] #[path = "tests/tls_size_constants_security_tests.rs"]
mod tls_size_constants_security_tests; mod tls_size_constants_security_tests;
#[cfg(test)] #[cfg(test)]

View File

@ -814,13 +814,13 @@ mod compile_time_security_checks {
// ============= Security-focused regression tests ============= // ============= Security-focused regression tests =============
#[cfg(test)] #[cfg(test)]
#[path = "tls_security_tests.rs"] #[path = "tests/tls_security_tests.rs"]
mod security_tests; mod security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "tls_adversarial_tests.rs"] #[path = "tests/tls_adversarial_tests.rs"]
mod adversarial_tests; mod adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "tls_fuzz_security_tests.rs"] #[path = "tests/tls_fuzz_security_tests.rs"]
mod fuzz_security_tests; mod fuzz_security_tests;

View File

@ -1211,53 +1211,53 @@ impl RunningClientHandler {
} }
#[cfg(test)] #[cfg(test)]
#[path = "client_security_tests.rs"] #[path = "tests/client_security_tests.rs"]
mod security_tests; mod security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_adversarial_tests.rs"] #[path = "tests/client_adversarial_tests.rs"]
mod adversarial_tests; mod adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_tls_mtproto_fallback_security_tests.rs"] #[path = "tests/client_tls_mtproto_fallback_security_tests.rs"]
mod tls_mtproto_fallback_security_tests; mod tls_mtproto_fallback_security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_tls_clienthello_size_security_tests.rs"] #[path = "tests/client_tls_clienthello_size_security_tests.rs"]
mod tls_clienthello_size_security_tests; mod tls_clienthello_size_security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_tls_clienthello_truncation_adversarial_tests.rs"] #[path = "tests/client_tls_clienthello_truncation_adversarial_tests.rs"]
mod tls_clienthello_truncation_adversarial_tests; mod tls_clienthello_truncation_adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_timing_profile_adversarial_tests.rs"] #[path = "tests/client_timing_profile_adversarial_tests.rs"]
mod timing_profile_adversarial_tests; mod timing_profile_adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_masking_budget_security_tests.rs"] #[path = "tests/client_masking_budget_security_tests.rs"]
mod masking_budget_security_tests; mod masking_budget_security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_masking_redteam_expected_fail_tests.rs"] #[path = "tests/client_masking_redteam_expected_fail_tests.rs"]
mod masking_redteam_expected_fail_tests; mod masking_redteam_expected_fail_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_masking_hard_adversarial_tests.rs"] #[path = "tests/client_masking_hard_adversarial_tests.rs"]
mod masking_hard_adversarial_tests; mod masking_hard_adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_masking_stress_adversarial_tests.rs"] #[path = "tests/client_masking_stress_adversarial_tests.rs"]
mod masking_stress_adversarial_tests; mod masking_stress_adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_masking_blackhat_campaign_tests.rs"] #[path = "tests/client_masking_blackhat_campaign_tests.rs"]
mod masking_blackhat_campaign_tests; mod masking_blackhat_campaign_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_masking_diagnostics_security_tests.rs"] #[path = "tests/client_masking_diagnostics_security_tests.rs"]
mod masking_diagnostics_security_tests; mod masking_diagnostics_security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "client_masking_shape_hardening_security_tests.rs"] #[path = "tests/client_masking_shape_hardening_security_tests.rs"]
mod masking_shape_hardening_security_tests; mod masking_shape_hardening_security_tests;

View File

@ -390,5 +390,5 @@ async fn do_tg_handshake_static(
} }
#[cfg(test)] #[cfg(test)]
#[path = "direct_relay_security_tests.rs"] #[path = "tests/direct_relay_security_tests.rs"]
mod security_tests; mod security_tests;

View File

@ -964,15 +964,15 @@ pub fn encrypt_tg_nonce(nonce: &[u8; HANDSHAKE_LEN]) -> Vec<u8> {
} }
#[cfg(test)] #[cfg(test)]
#[path = "handshake_security_tests.rs"] #[path = "tests/handshake_security_tests.rs"]
mod security_tests; mod security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "handshake_adversarial_tests.rs"] #[path = "tests/handshake_adversarial_tests.rs"]
mod adversarial_tests; mod adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "handshake_fuzz_security_tests.rs"] #[path = "tests/handshake_fuzz_security_tests.rs"]
mod fuzz_security_tests; mod fuzz_security_tests;
/// Compile-time guard: HandshakeSuccess holds cryptographic key material and /// Compile-time guard: HandshakeSuccess holds cryptographic key material and

View File

@ -408,9 +408,9 @@ async fn consume_client_data<R: AsyncRead + Unpin>(mut reader: R) {
} }
#[cfg(test)] #[cfg(test)]
#[path = "masking_security_tests.rs"] #[path = "tests/masking_security_tests.rs"]
mod security_tests; mod security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "masking_adversarial_tests.rs"] #[path = "tests/masking_adversarial_tests.rs"]
mod adversarial_tests; mod adversarial_tests;

View File

@ -1647,9 +1647,9 @@ where
} }
#[cfg(test)] #[cfg(test)]
#[path = "middle_relay_security_tests.rs"] #[path = "tests/middle_relay_security_tests.rs"]
mod security_tests; mod security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "middle_relay_idle_policy_security_tests.rs"] #[path = "tests/middle_relay_idle_policy_security_tests.rs"]
mod idle_policy_security_tests; mod idle_policy_security_tests;

View File

@ -657,9 +657,9 @@ where
} }
#[cfg(test)] #[cfg(test)]
#[path = "relay_security_tests.rs"] #[path = "tests/relay_security_tests.rs"]
mod security_tests; mod security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "relay_adversarial_tests.rs"] #[path = "tests/relay_adversarial_tests.rs"]
mod adversarial_tests; mod adversarial_tests;

View File

@ -133,5 +133,5 @@ pub(crate) fn cutover_stagger_delay(session_id: u64, generation: u64) -> Duratio
} }
#[cfg(test)] #[cfg(test)]
#[path = "route_mode_security_tests.rs"] #[path = "tests/route_mode_security_tests.rs"]
mod security_tests; mod security_tests;

View File

@ -1893,9 +1893,9 @@ mod tests {
} }
#[cfg(test)] #[cfg(test)]
#[path = "connection_lease_security_tests.rs"] #[path = "tests/connection_lease_security_tests.rs"]
mod connection_lease_security_tests; mod connection_lease_security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "replay_checker_security_tests.rs"] #[path = "tests/replay_checker_security_tests.rs"]
mod replay_checker_security_tests; mod replay_checker_security_tests;

View File

@ -294,7 +294,7 @@ pub fn build_emulated_server_hello(
} }
#[cfg(test)] #[cfg(test)]
#[path = "emulator_security_tests.rs"] #[path = "tests/emulator_security_tests.rs"]
mod security_tests; mod security_tests;
#[cfg(test)] #[cfg(test)]

View File

@ -22,16 +22,22 @@ mod selftest;
mod wire; mod wire;
mod pool_status; mod pool_status;
#[cfg(test)] #[cfg(test)]
#[path = "tests/health_regression_tests.rs"]
mod health_regression_tests; mod health_regression_tests;
#[cfg(test)] #[cfg(test)]
#[path = "tests/health_integration_tests.rs"]
mod health_integration_tests; mod health_integration_tests;
#[cfg(test)] #[cfg(test)]
#[path = "tests/health_adversarial_tests.rs"]
mod health_adversarial_tests; mod health_adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "tests/send_adversarial_tests.rs"]
mod send_adversarial_tests; mod send_adversarial_tests;
#[cfg(test)] #[cfg(test)]
#[path = "tests/pool_writer_security_tests.rs"]
mod pool_writer_security_tests; mod pool_writer_security_tests;
#[cfg(test)] #[cfg(test)]
#[path = "tests/pool_refill_security_tests.rs"]
mod pool_refill_security_tests; mod pool_refill_security_tests;
use bytes::Bytes; use bytes::Bytes;