Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions validator/src/validators/synthetic_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(),
Expand All @@ -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(),
Expand All @@ -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",
Expand Down