File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ ignore:
23
23
- " **/test_utils*"
24
24
- " **/test_util*"
25
25
- " **/tests*"
26
+ - " crates/derive-alloy/src/alloy_providers.rs"
27
+ - " crates/derive-alloy/src/beacon_client.rs"
26
28
- " crates/mpt/src/noop.rs"
27
29
28
30
# Make comments less noisy
Original file line number Diff line number Diff line change @@ -34,3 +34,27 @@ impl From<AlloyProviderError> for PipelineErrorKind {
34
34
}
35
35
}
36
36
}
37
+
38
+ #[ cfg( test) ]
39
+ mod tests {
40
+ use super :: * ;
41
+
42
+ #[ test]
43
+ fn test_from_alloy_provider_error ( ) {
44
+ let err: PipelineErrorKind = AlloyProviderError :: Rlp ( alloy_rlp:: Error :: Overflow ) . into ( ) ;
45
+ assert ! ( matches!( err, PipelineErrorKind :: Critical ( _) ) ) ;
46
+
47
+ let err: PipelineErrorKind =
48
+ AlloyProviderError :: BlockInfo ( FromBlockError :: InvalidGenesisHash ) . into ( ) ;
49
+ assert ! ( matches!( err, PipelineErrorKind :: Critical ( _) ) ) ;
50
+
51
+ let err: PipelineErrorKind = AlloyProviderError :: OpBlockConversion (
52
+ OpBlockConversionError :: MissingSystemConfigGenesis ,
53
+ )
54
+ . into ( ) ;
55
+ assert ! ( matches!( err, PipelineErrorKind :: Critical ( _) ) ) ;
56
+
57
+ let err: PipelineErrorKind = AlloyProviderError :: Rpc ( RpcError :: NullResp ) . into ( ) ;
58
+ assert ! ( matches!( err, PipelineErrorKind :: Temporary ( _) ) ) ;
59
+ }
60
+ }
You can’t perform that action at this time.
0 commit comments