From d066747672c57ae9083b577032c02e48d35501f8 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 25 May 2024 04:00:56 +0100 Subject: [PATCH] fix: redis URL --- auth/redis-session/src/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/auth/redis-session/src/main.rs b/auth/redis-session/src/main.rs index 7d2e117..b795c46 100644 --- a/auth/redis-session/src/main.rs +++ b/auth/redis-session/src/main.rs @@ -81,7 +81,9 @@ async fn main() -> std::io::Result<()> { // authentication cookies for any user! let private_key = actix_web::cookie::Key::generate(); - let store = RedisSessionStore::new("127.0.0.1:6379").await.unwrap(); + let store = RedisSessionStore::new("redis://127.0.0.1:6379") + .await + .unwrap(); HttpServer::new(move || { App::new() @@ -108,7 +110,10 @@ mod test { #[actix_web::test] async fn test_workflow() { let private_key = actix_web::cookie::Key::generate(); - let store = RedisSessionStore::new("127.0.0.1:6379").await.unwrap(); + let store = RedisSessionStore::new("redis://127.0.0.1:6379") + .await + .unwrap(); + let srv = actix_test::start(move || { App::new() .wrap(