From 83893400b377630a53dad057005cd0ff30c6d0a3 Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Fri, 19 Apr 2024 12:38:59 -0300 Subject: [PATCH] fix: unit test --- availability-oracle/src/test.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/availability-oracle/src/test.rs b/availability-oracle/src/test.rs index 2809766..a24b9b5 100644 --- a/availability-oracle/src/test.rs +++ b/availability-oracle/src/test.rs @@ -1,4 +1,5 @@ use crate::contract; +use crate::epoch_block_oracle_subgraph::*; use crate::ipfs::*; use crate::network_subgraph::*; use crate::util::bytes32_to_cid_v0; @@ -51,7 +52,7 @@ async fn test_reconcile() { Arc::new(MockSubgraph), 0, Duration::default(), - &vec!["mainnet".into()], + Arc::new(MockEBOSubgraph), &vec![ "ethereum".into(), "ethereum/contract".into(), @@ -95,6 +96,14 @@ impl NetworkSubgraph for MockSubgraph { } } +struct MockEBOSubgraph; + +impl EpochBlockOracleSubgraph for MockEBOSubgraph { + fn supported_networks(self: Arc) -> Pin>>> { + futures::stream::iter(vec![Ok("mainnet".to_string())]).boxed() + } +} + struct MockIpfs; #[async_trait]