Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
batconjurer committed Jan 6, 2025
1 parent e898c4d commit 0f1d3cc
Show file tree
Hide file tree
Showing 3 changed files with 331 additions and 139 deletions.
8 changes: 5 additions & 3 deletions crates/tests/src/e2e/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ pub fn make_hermes_config(
hermes_dir: &TestDir,
test_a: &Test,
test_b: &Test,
relayer: Option<&str>,
) -> Result<()> {
let mut config = toml::map::Map::new();

Expand Down Expand Up @@ -537,13 +538,13 @@ pub fn make_hermes_config(
let chains = vec![
match CosmosChainType::chain_type(test_a.net.chain_id.as_str()) {
Ok(chain_type) => make_hermes_chain_config_for_cosmos(
hermes_dir, chain_type, test_a,
hermes_dir, chain_type, test_a, relayer,
),
Err(_) => make_hermes_chain_config(hermes_dir, test_a),
},
match CosmosChainType::chain_type(test_b.net.chain_id.as_str()) {
Ok(chain_type) => make_hermes_chain_config_for_cosmos(
hermes_dir, chain_type, test_b,
hermes_dir, chain_type, test_b, relayer,
),
Err(_) => make_hermes_chain_config(hermes_dir, test_b),
},
Expand Down Expand Up @@ -617,6 +618,7 @@ fn make_hermes_chain_config_for_cosmos(
hermes_dir: &TestDir,
chain_type: CosmosChainType,
test: &Test,
relayer: Option<&str>,
) -> Value {
let mut table = toml::map::Map::new();
table.insert("mode".to_owned(), Value::String("push".to_owned()));
Expand Down Expand Up @@ -657,7 +659,7 @@ fn make_hermes_chain_config_for_cosmos(
);
chain.insert(
"key_name".to_owned(),
Value::String(setup::constants::COSMOS_RELAYER.to_string()),
Value::String(relayer.unwrap_or_else(|| constants::COSMOS_RELAYER).to_string()),
);
let hermes_dir: &Path = hermes_dir.as_ref();
let key_dir = hermes_dir.join("hermes/keys");
Expand Down
Loading

0 comments on commit 0f1d3cc

Please sign in to comment.