Add new test based on token auth with TLS
This commit is contained in:
.gitignore
src
base
test
client_try_tls_while_there_is_no_tls.rsdummy_tcp_sockets.rsinvalid_token_file.rsinvalid_with_token_auth.rsmod.rspki.rstest_files_utils.rs
test_pki
ExpiredClient.crtExpiredClient.keyOtherCA.crlOtherCA.crtOtherCA.keyRevokedClient.crtRevokedClient.keyTCPTunnelTestCA.crlTCPTunnelTestCA.crtTCPTunnelTestCA.keyValidClient.crtValidClient.keylocalhost.crtlocalhost.key
valid_token_with_custom_increment.rsvalid_with_multiple_token_auth.rsvalid_with_token_auth.rsvalid_with_token_auth_and_server_tls.rsvalid_with_token_auth_multiple_ports.rsvalid_with_token_file.rswith_token_auth_and_invalid_server_tls_bad_ca.rswith_token_auth_and_invalid_server_tls_expired_and_bad_cn.rs@ -5,7 +5,7 @@ use crate::tcp_relay_server::server_config::ServerConfig;
|
||||
use crate::test::dummy_tcp_sockets::{
|
||||
dummy_tcp_client_square_root_requests, wait_for_port, DummyTCPServer,
|
||||
};
|
||||
use crate::test::{get_port_number, PortsAllocation, LOCALHOST};
|
||||
use crate::test::{get_port_number, PortsAllocation, LOCALHOST_IP};
|
||||
|
||||
const VALID_TOKEN: &str = "AvalidTOKEN";
|
||||
|
||||
@ -49,8 +49,8 @@ async fn valid_with_token_file() {
|
||||
// Start client relay
|
||||
task::spawn(crate::tcp_relay_client::run_app(ClientConfig {
|
||||
token: Some(VALID_TOKEN.to_string()),
|
||||
relay_url: format!("http://{}:{}", LOCALHOST, port(0)),
|
||||
listen_address: LOCALHOST.to_string(),
|
||||
relay_url: format!("http://{}:{}", LOCALHOST_IP, port(0)),
|
||||
listen_address: LOCALHOST_IP.to_string(),
|
||||
root_certificate: None,
|
||||
..Default::default()
|
||||
}));
|
||||
|
Reference in New Issue
Block a user