Add new test based on token auth with TLS
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user