test: fix chromium-headless and issuer_url

fix for #25
This commit is contained in:
Paul Zinselmeyer 2025-04-18 16:10:16 +02:00
parent fa5faed004
commit 65cb175603
Signed by: pfzetto
GPG key ID: B471A1AF06C895FD
4 changed files with 5 additions and 10 deletions

View file

@ -21,3 +21,5 @@ reqwest = { version = "0.12", features = ["rustls-tls"], default-features = fals
env_logger = "0.11"
log = "0.4"
headless_chrome = "1.0"
#see https://github.com/rust-headless-chrome/rust-headless-chrome/issues/535
auto_generate_cdp = "=0.4.4"

View file

@ -16,12 +16,7 @@ use tower_sessions::{
Expiry, MemoryStore, SessionManagerLayer,
};
pub async fn run(
app_url: String,
issuer: String,
client_id: String,
client_secret: Option<String>,
) {
pub async fn run(issuer: String, client_id: String, client_secret: Option<String>) {
let session_store = MemoryStore::default();
let session_layer = SessionManagerLayer::new(session_store)
.with_secure(false)

View file

@ -2,9 +2,8 @@ use basic::run;
#[tokio::main]
async fn main() {
dotenvy::dotenv().ok();
let app_url = std::env::var("APP_URL").expect("APP_URL env variable");
let issuer = std::env::var("ISSUER").expect("ISSUER env variable");
let client_id = std::env::var("CLIENT_ID").expect("CLIENT_ID env variable");
let client_secret = std::env::var("CLIENT_SECRET").ok();
run(app_url, issuer, client_id, client_secret).await
run(issuer, client_id, client_secret).await
}

View file

@ -31,9 +31,8 @@ async fn first() {
info!("starting basic example app");
let app_url = "http://127.0.0.1:8080/";
let app_url = "http://localhost:8080/";
let app_handle = tokio::spawn(basic::run(
app_url.to_string(),
format!("{}/realms/test", keycloak.url()),
basic_client.client_id.to_string(),
basic_client.client_secret.clone(),