This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tcp-over-http/src/test/mod.rs

55 lines
1.7 KiB
Rust

#[non_exhaustive]
enum PortsAllocation {
TestsWithoutPortOpened,
DummyTCPServer,
ValidWithTokenAuth,
ValidWithTLSAuth,
InvalidWithTokenAuth,
ValidWithMultipleTokenAuth,
ValidWithTokenFile,
ClientTryTLSWhileThereIsNoTLS,
ValidTokenWithCustomIncrement,
ValidWithTokenAuthMultiplePorts,
ValidWithTokenAuthAndServerTLS,
WithTokenAuthAndInvalidServerTLSBadCA,
WithTokenAuthAndInvalidServerTLSExpiredAndBadCN,
TlsAuthExpiredClientCertificate,
TlsAuthRevokedClientCertificate,
TlsAuthInvalidClientCertificate,
ClientInvalidTlsConfiguration,
}
fn get_port_number(alloc: PortsAllocation, index: u16) -> u16 {
30000 + 20 * (alloc as u16) + index
}
const LOCALHOST_IP: &str = "127.0.0.1";
const BAD_PATH: &str = "/bad/path/to/key/file";
mod dummy_tcp_sockets;
mod pki;
mod test_files_utils;
mod client_invalid_tls_configuration;
mod client_invalid_tls_root_certificate_file;
mod client_try_tls_while_there_is_no_tls;
mod invalid_with_token_auth;
mod server_invalid_tls_config_invalid_cert;
mod server_invalid_tls_config_invalid_client_crl;
mod server_invalid_tls_config_invalid_client_root_cert;
mod server_invalid_tls_config_invalid_key;
mod server_invalid_token_file;
mod server_missing_auth;
mod tls_auth_expired_certificate;
mod tls_auth_invalid_certificate;
mod tls_auth_revoked_certificate;
mod valid_token_with_custom_increment;
mod valid_with_multiple_token_auth;
mod valid_with_tls_auth;
mod valid_with_token_auth;
mod valid_with_token_auth_and_server_tls;
mod valid_with_token_auth_multiple_ports;
mod valid_with_token_file;
mod with_token_auth_and_invalid_server_tls_bad_ca;
mod with_token_auth_and_invalid_server_tls_expired_and_bad_cn;