MCPcopy Create free account
hub / github.com/cowprotocol/services / test_https

Function test_https

crates/ethrpc/src/lib.rs:86–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85 #[tokio::test]
86 async fn test_https() {
87 let provider = Web3::new_from_url("https://rpc.mevblocker.io");
88 let response = provider.provider.get_block(BlockId::latest()).await;
89
90 if let Err(err) = response {
91 // only fail the CI if we are sure the error is due to missing
92 // `https` support
93 if err.to_string().contains("scheme is not http") {
94 eprintln!("{err:?}");
95 panic!("https support is not enabled");
96 } else {
97 eprintln!("mevblocker error unrelated to https support: {err:?}");
98 }
99 }
100 }
101}

Callers

nothing calls this directly

Calls 2

to_stringMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected