You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
658 B
29 lines
658 B
3 years ago
|
mod fixtures;
|
||
3 years ago
|
mod helpers;
|
||
2 years ago
|
mod integration;
|
||
3 years ago
|
|
||
3 years ago
|
use u_lib::config::MASTER_PORT;
|
||
2 years ago
|
use u_lib::utils::Env;
|
||
3 years ago
|
|
||
3 years ago
|
#[macro_use]
|
||
|
extern crate rstest;
|
||
3 years ago
|
|
||
|
#[tokio::test]
|
||
|
async fn test_non_auth_connection_dropped() {
|
||
2 years ago
|
let env = Env::init_default().unwrap();
|
||
3 years ago
|
let client = reqwest::ClientBuilder::new()
|
||
|
.danger_accept_invalid_certs(true)
|
||
|
.build()
|
||
|
.unwrap();
|
||
|
match client
|
||
2 years ago
|
.get(format!("https://{}:{}", &env.u_server, MASTER_PORT))
|
||
3 years ago
|
.send()
|
||
|
.await
|
||
|
{
|
||
3 years ago
|
Err(e) => {
|
||
3 years ago
|
assert!(e.to_string().contains("channel closed"))
|
||
3 years ago
|
}
|
||
|
_ => panic!("no error occured on foreign client connection"),
|
||
|
}
|
||
|
}
|