Add new test based on token auth with TLS

This commit is contained in:
2022-09-02 09:43:07 +02:00
parent 886843d087
commit 40c1bfc938
32 changed files with 747 additions and 30 deletions

View File

@ -5,13 +5,13 @@ use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::{TcpListener, TcpStream};
use tokio::time;
use crate::test::LOCALHOST;
use crate::test::LOCALHOST_IP;
pub struct DummyTCPServer(TcpListener);
impl DummyTCPServer {
pub async fn start(port: u16) -> Self {
let addr = format!("{}:{}", LOCALHOST, port);
let addr = format!("{}:{}", LOCALHOST_IP, port);
println!("[DUMMY TCP] Listen on {}", addr);
let listener = TcpListener::bind(addr)
.await