Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikol committed Feb 23, 2024
1 parent 17ce6c0 commit 831aafe
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions crates/oracle/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,24 +341,19 @@ mod tests {
}

#[test]
fn set_jrpc_provider_via_env_var() {
fn set_provider_via_env_var() {
let jrpc_url = "https://sokol-archive.blockscout.com/";
std::env::set_var("FOOBAR_EIP155:77", jrpc_url);

let url = "https://sokol-archive.blockscout.com/";
std::env::set_var("FOOBAR_bip122:77", url);

let config = Config::parse(config_file_path("indexed_chain_provider_via_env_var.toml"));

assert_eq!(
indexed_chain(&config, "eip155:77").jrpc_url.as_str(),
jrpc_url
);
}

#[test]
fn set_blockmeta_provider_via_env_var() {
let url = "https://sokol-archive.blockscout.com/";
std::env::set_var("FOOBAR_bip122:77", url);

let config = Config::parse(config_file_path("indexed_chain_provider_via_env_var.toml"));

assert_eq!(
blockmeta_indexed_chain(&config, "bip122:77").url.as_str(),
Expand Down

0 comments on commit 831aafe

Please sign in to comment.