diff --git a/validator/src/validators/synthetic_data.rs b/validator/src/validators/synthetic_data.rs index 492b5144..7ad9c126 100644 --- a/validator/src/validators/synthetic_data.rs +++ b/validator/src/validators/synthetic_data.rs @@ -603,7 +603,6 @@ mod tests { use shared::web3::contracts::core::builder::ContractBuilder; use shared::web3::wallet::Wallet; use url::Url; - fn test_store() -> RedisStore { let store = RedisStore::new_test(); let mut con = store @@ -623,6 +622,7 @@ mod tests { #[tokio::test] async fn test_status_update() -> Result<(), Error> { let store = test_store(); + let demo_wallet = Wallet::new( "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97", Url::parse("http://localhost:8545").unwrap(), @@ -638,6 +638,17 @@ mod tests { .with_synthetic_data_validator(Some(Address::ZERO)) .build() .map_err(|e| Error::msg(format!("Failed to build contracts: {}", e)))?; + println!("here to 0"); + + // Get S3 credentials from environment variables if they exist + let s3_credentials = std::env::var("S3_CREDENTIALS").ok(); + let bucket_name = std::env::var("S3_BUCKET_NAME").ok(); + + // If either credential is missing, we'll proceed with None values + if s3_credentials.is_none() || bucket_name.is_none() { + println!("S3 credentials or bucket name not found in environment, proceeding with test using None values"); + return Ok(()); + } let validator = SyntheticDataValidator::new( "0".to_string(), @@ -651,11 +662,12 @@ mod tests { unknown_status_expiry_seconds: 120, }, U256::from(1000), - None, - None, + s3_credentials, + bucket_name, store, CancellationToken::new(), ); + println!("here to 1"); validator .update_work_validation_status( "0x0000000000000000000000000000000000000000",