#![allow(dead_code)]
use technitium::Client;
pub fn server_url() -> String {
std::env::var("TECHNITIUM_URL").unwrap_or_else(|_| "http://localhost:5380".to_string())
}
pub fn admin_username() -> String {
std::env::var("TECHNITIUM_USER").unwrap_or_else(|_| "admin".to_string())
}
pub fn admin_password() -> String {
std::env::var("TECHNITIUM_PASSWORD").unwrap_or_else(|_| "admin".to_string())
}
pub fn build_client() -> Client {
Client::builder()
.base_url(server_url())
.build()
.expect("failed to build test client")
}
pub async fn authenticated_client() -> Client {
let client = build_client();
client
.login(&admin_username(), &admin_password())
.await
.expect("failed to authenticate test client");
client
}