Skip to content

Commit 8389340

Browse files
committed
fix: unit test
1 parent bf38303 commit 8389340

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

availability-oracle/src/test.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::contract;
2+
use crate::epoch_block_oracle_subgraph::*;
23
use crate::ipfs::*;
34
use crate::network_subgraph::*;
45
use crate::util::bytes32_to_cid_v0;
@@ -51,7 +52,7 @@ async fn test_reconcile() {
5152
Arc::new(MockSubgraph),
5253
0,
5354
Duration::default(),
54-
&vec!["mainnet".into()],
55+
Arc::new(MockEBOSubgraph),
5556
&vec![
5657
"ethereum".into(),
5758
"ethereum/contract".into(),
@@ -95,6 +96,14 @@ impl NetworkSubgraph for MockSubgraph {
9596
}
9697
}
9798

99+
struct MockEBOSubgraph;
100+
101+
impl EpochBlockOracleSubgraph for MockEBOSubgraph {
102+
fn supported_networks(self: Arc<Self>) -> Pin<Box<dyn Stream<Item = Result<String, Error>>>> {
103+
futures::stream::iter(vec![Ok("mainnet".to_string())]).boxed()
104+
}
105+
}
106+
98107
struct MockIpfs;
99108

100109
#[async_trait]

0 commit comments

Comments
 (0)