diff --git a/protocol-testing/src/config.rs b/protocol-testing/src/config.rs index 364a503..1661c8b 100644 --- a/protocol-testing/src/config.rs +++ b/protocol-testing/src/config.rs @@ -28,8 +28,8 @@ impl ProtocolComponentExpectation { pub fn compare(&self, other: &ProtocolComponent, colorize_output: bool) -> Option { let mut diffs = Vec::new(); - // Compare id - if self.id != other.id { + // Compare id (case-insensitive) + if self.id.to_lowercase() != other.id.to_lowercase() { let diff = self.format_diff("id", &self.id, &other.id, colorize_output); diffs.push(format!("Field 'id' mismatch for {}:\n{}", self.id, diff)); } diff --git a/protocol-testing/src/test_runner.rs b/protocol-testing/src/test_runner.rs index fe753ac..96b863b 100644 --- a/protocol-testing/src/test_runner.rs +++ b/protocol-testing/src/test_runner.rs @@ -257,7 +257,7 @@ fn validate_state( let expected_ids = expected_components .iter() - .map(|c| c.base.id.clone()) + .map(|c| c.base.id.to_lowercase()) .collect::>(); let protocol_states = rt @@ -274,12 +274,12 @@ fn validate_state( let components_by_id: HashMap = protocol_components .clone() .into_iter() - .map(|c| (c.id.clone(), c)) + .map(|c| (c.id.to_lowercase(), c)) .collect(); let protocol_states_by_id: HashMap = protocol_states .into_iter() - .map(|s| (s.component_id.clone(), s)) + .map(|s| (s.component_id.to_lowercase(), s)) .collect(); info!("Found {} protocol components", components_by_id.len()); @@ -290,7 +290,7 @@ fn validate_state( // Step 1: Validate that all expected components are present on Tycho after indexing debug!("Validating {:?} expected components", expected_components.len()); for expected_component in expected_components { - let component_id = expected_component.base.id.clone(); + let component_id = expected_component.base.id.to_lowercase(); let component = components_by_id .get(&component_id) @@ -366,7 +366,7 @@ fn validate_state( let simulation_component_ids: std::collections::HashSet = expected_components .iter() .filter(|c| !c.skip_simulation) - .map(|c| c.base.id.clone()) + .map(|c| c.base.id.to_lowercase()) .collect(); info!("Components to simulate: {}", simulation_component_ids.len()); diff --git a/substreams/ethereum-balancer-v3/integration_test.tycho.yaml b/substreams/ethereum-balancer-v3/integration_test.tycho.yaml index d5bf2f4..bba8800 100644 --- a/substreams/ethereum-balancer-v3/integration_test.tycho.yaml +++ b/substreams/ethereum-balancer-v3/integration_test.tycho.yaml @@ -68,8 +68,8 @@ tests: expected_components: - id: "0xf91c11BA4220b7a72E1dc5E92f2b48D3fdF62726" tokens: - - "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" - "0x440017A1b021006d556d7fc06A54c32E42Eb745B" + - "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" static_attributes: pool_type: "0x5765696768746564506f6f6c466163746f7279" manual_updates: "0x01"