mirror of https://github.com/fafhrd91/actix-net
update tls tests
This commit is contained in:
parent
0134fc22b9
commit
01e06a84a5
|
@ -51,7 +51,7 @@ async fn testing_server_echo() {
|
|||
async fn new_with_builder() {
|
||||
let alt_addr = TestServer::unused_addr();
|
||||
|
||||
let srv = TestServer::with_builder(
|
||||
let srv = TestServer::start_with_builder(
|
||||
Server::build()
|
||||
.bind("alt", alt_addr, || {
|
||||
fn_service(|_| async { Ok::<_, ()>(()) })
|
||||
|
|
|
@ -50,7 +50,7 @@ async fn test_rustls_string() {
|
|||
|
||||
#[actix_rt::test]
|
||||
async fn test_static_str() {
|
||||
let srv = TestServer::with(|| {
|
||||
let srv = TestServer::start(|| {
|
||||
fn_service(|io: TcpStream| async {
|
||||
let mut framed = Framed::new(io, BytesCodec);
|
||||
framed.send(Bytes::from_static(b"test")).await?;
|
||||
|
@ -81,7 +81,7 @@ async fn service_factory() {
|
|||
Connector::default()
|
||||
}
|
||||
|
||||
let srv = TestServer::with(|| {
|
||||
let srv = TestServer::start(|| {
|
||||
fn_service(|io: TcpStream| async {
|
||||
let mut framed = Framed::new(io, BytesCodec);
|
||||
framed.send(Bytes::from_static(b"test")).await?;
|
||||
|
@ -136,7 +136,7 @@ async fn test_rustls_uri() {
|
|||
|
||||
#[actix_rt::test]
|
||||
async fn test_local_addr() {
|
||||
let srv = TestServer::with(|| {
|
||||
let srv = TestServer::start(|| {
|
||||
fn_service(|io: TcpStream| async {
|
||||
let mut framed = Framed::new(io, BytesCodec);
|
||||
framed.send(Bytes::from_static(b"test")).await?;
|
||||
|
|
|
@ -53,7 +53,7 @@ async fn custom_resolver_connect() {
|
|||
use trust_dns_resolver::TokioAsyncResolver;
|
||||
|
||||
let srv =
|
||||
TestServer::with(|| fn_service(|_io: TcpStream| async { Ok::<_, io::Error>(()) }));
|
||||
TestServer::start(|| fn_service(|_io: TcpStream| async { Ok::<_, io::Error>(()) }));
|
||||
|
||||
struct MyResolver {
|
||||
trust_dns: TokioAsyncResolver,
|
||||
|
|
Loading…
Reference in New Issue