diff --git a/golem-test-framework/src/config/env.rs b/golem-test-framework/src/config/env.rs index c148864772..6daec22d3b 100644 --- a/golem-test-framework/src/config/env.rs +++ b/golem-test-framework/src/config/env.rs @@ -16,6 +16,7 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use crate::components; +use crate::components::cassandra::docker::DockerCassandra; use crate::components::cassandra::Cassandra; use crate::components::component_compilation_service::docker::DockerComponentCompilationService; use crate::components::component_compilation_service::spawned::SpawnedComponentCompilationService; @@ -80,7 +81,7 @@ impl EnvBasedTestDependenciesConfig { self.keep_docker_containers = keep_docker_containers } - if let Some(redis_port) = opt_env_var("REDIS_KEY_PREFIX") { + if let Some(redis_port) = opt_env_var("REDIS_PORT") { self.redis_port = redis_port.parse().expect("Failed to parse REDIS_PORT"); } @@ -152,6 +153,7 @@ pub struct EnvBasedTestDependencies { component_compilation_service: Arc, worker_service: Arc, worker_executor_cluster: Arc, + cassandra: Arc, } impl EnvBasedTestDependencies { @@ -407,6 +409,12 @@ impl EnvBasedTestDependencies { } } + fn make_cassandra( + _config: Arc, + ) -> Arc { + Arc::new(DockerCassandra::new(false)) + } + pub async fn new(config: EnvBasedTestDependenciesConfig) -> Self { let config = Arc::new(config); @@ -462,6 +470,8 @@ impl EnvBasedTestDependencies { let redis_monitor = redis_monitor_join.await.expect("Failed to join"); + let cassandra = Self::make_cassandra(config.clone()); + Self { config: config.clone(), rdb, @@ -472,6 +482,7 @@ impl EnvBasedTestDependencies { component_compilation_service, worker_service, worker_executor_cluster, + cassandra, } } } @@ -515,7 +526,7 @@ impl TestDependencies for EnvBasedTestDependencies { self.worker_executor_cluster.clone() } fn cassandra(&self) -> Arc { - panic!("Not supported") + self.cassandra.clone() } }