diff --git a/crates/buzz-relay/src/workflow_delivery_tests.rs b/crates/buzz-relay/src/workflow_delivery_tests.rs index 316f0d45fa..0b124f7d96 100644 --- a/crates/buzz-relay/src/workflow_delivery_tests.rs +++ b/crates/buzz-relay/src/workflow_delivery_tests.rs @@ -1,5 +1,5 @@ //! Real-storage regressions for workflow wake lifecycle boundaries. -use super::integration_tests::test_state; +use super::integration_tests::test_state_with_redis; use super::*; use axum::{ extract::{Path, State}, @@ -23,7 +23,10 @@ struct Fixture { } impl Fixture { async fn new() -> Self { - let state = test_state().await; + let state = test_state_with_redis( + std::env::var("REDIS_URL").unwrap_or_else(|_| "redis://localhost:6379".into()), + ) + .await; let owner = Keys::generate(); let agent = Keys::generate(); let host = format!("wake-{}.example", Uuid::new_v4().simple()); @@ -161,7 +164,7 @@ impl Fixture { } #[tokio::test] -#[ignore = "requires Postgres"] +#[ignore = "requires Postgres and Redis"] async fn captured_revision_survives_replacement_but_not_revocation() { let f = Fixture::new().await; let a = f.revision(Timestamp::now().as_secs()).await; @@ -211,7 +214,7 @@ async fn captured_revision_survives_replacement_but_not_revocation() { } #[tokio::test] -#[ignore = "requires Postgres"] +#[ignore = "requires Postgres and Redis"] async fn removed_open_channel_member_cannot_read_or_count_wakes() { let f = Fixture::new().await; let a = f.revision(Timestamp::now().as_secs()).await; @@ -281,7 +284,7 @@ async fn removed_open_channel_member_cannot_read_or_count_wakes() { } #[tokio::test] -#[ignore = "requires Postgres"] +#[ignore = "requires Postgres and Redis"] async fn notification_failure_rolls_back_message_mentions_and_thread_metadata() { let f = Fixture::new().await; let message = EventBuilder::new(Kind::Custom(KIND_STREAM_MESSAGE as u16), "@Worker work") diff --git a/crates/buzz-relay/src/workflow_sink.rs b/crates/buzz-relay/src/workflow_sink.rs index a3936bc782..8d07727ac6 100644 --- a/crates/buzz-relay/src/workflow_sink.rs +++ b/crates/buzz-relay/src/workflow_sink.rs @@ -920,10 +920,14 @@ pub(crate) mod postgres_tests { /// Real-PG state mirroring `handlers::event::tests::test_state_with_redis_url`. pub(crate) async fn test_state() -> Arc { + test_state_with_redis("redis://127.0.0.1:1".to_string()).await + } + + pub(crate) async fn test_state_with_redis(redis_url: String) -> Arc { let mut config = crate::config::Config::from_env().expect("default config loads"); config.require_relay_membership = false; config.require_auth_token = false; - config.redis_url = "redis://127.0.0.1:1".to_string(); + config.redis_url = redis_url; let pool = sqlx::PgPool::connect_lazy(&config.database_url).expect("lazy pg pool"); let db = buzz_db::Db::from_pool(pool.clone()); let redis_pool = deadpool_redis::Config::from_url(&config.redis_url)