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.
|
|
|
mod behaviour;
|
|
|
|
mod fixtures;
|
|
|
|
mod helpers;
|
|
|
|
|
|
|
|
use std::env;
|
|
|
|
use u_lib::config::MASTER_PORT;
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate rstest;
|
|
|
|
|
|
|
|
#[tokio::test]
|
|
|
|
async fn test_non_auth_connection_dropped() {
|
|
|
|
let env_server = env::var("U_SERVER").unwrap();
|
|
|
|
let client = reqwest::ClientBuilder::new()
|
|
|
|
.danger_accept_invalid_certs(true)
|
|
|
|
.build()
|
|
|
|
.unwrap();
|
|
|
|
match client
|
|
|
|
.get(format!("https://{}:{}", env_server, MASTER_PORT))
|
|
|
|
.send()
|
|
|
|
.await
|
|
|
|
{
|
|
|
|
Err(e) => {
|
|
|
|
assert!(e.to_string().contains("channel closed"))
|
|
|
|
}
|
|
|
|
_ => panic!("no error occured on foreign client connection"),
|
|
|
|
}
|
|
|
|
}
|