Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikol committed Apr 19, 2024
1 parent 691531f commit 73e037a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion availability-oracle/src/test.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -95,6 +96,14 @@ impl NetworkSubgraph for MockSubgraph {
}
}

struct MockEBOSubgraph;

impl EpochBlockOracleSubgraph for MockEBOSubgraph {
fn supported_networks(self: Arc<Self>) -> Pin<Box<dyn Stream<Item = Result<String, Error>>>> {
futures::stream::iter(vec![Ok("mainnet".to_string())]).boxed()
}
}

struct MockIpfs;

#[async_trait]
Expand Down

0 comments on commit 73e037a

Please sign in to comment.