-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65613b3
commit 4148b92
Showing
12 changed files
with
127 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 0 additions & 100 deletions
100
crates/cosmos/cosmos-integration-tests/src/tests/bootstrap.rs
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
crates/cosmos/cosmos-integration-tests/src/tests/celestia.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
use core::time::Duration; | ||
use std::sync::Arc; | ||
|
||
use eyre::Error; | ||
use hermes_cosmos_relayer::contexts::builder::CosmosBuilder; | ||
use hermes_cosmos_test_components::chain_driver::types::denom::Denom; | ||
use hermes_ibc_test_suite::tests::transfer::TestIbcTransfer; | ||
use hermes_relayer_runtime::types::runtime::HermesRuntime; | ||
use hermes_test_components::setup::traits::run_test::CanRunTest; | ||
use ibc_relayer::chain::client::ClientSettings; | ||
use ibc_relayer::chain::cosmos::client::Settings; | ||
use ibc_relayer::config::compat_mode::CompatMode; | ||
use ibc_relayer_types::core::ics02_client::trust_threshold::TrustThreshold; | ||
use ibc_relayer_types::core::ics24_host::identifier::PortId; | ||
use tokio::runtime::Builder; | ||
|
||
use crate::contexts::binary_channel::setup::CosmosBinaryChannelSetup; | ||
use crate::contexts::bootstrap::CosmosBootstrap; | ||
|
||
#[test] | ||
fn celestia_integration_tests() -> Result<(), Error> { | ||
let _ = stable_eyre::install(); | ||
|
||
let tokio_runtime = Arc::new(Builder::new_multi_thread().enable_all().build()?); | ||
|
||
let runtime = HermesRuntime::new(tokio_runtime.clone()); | ||
|
||
let builder = CosmosBuilder::new_with_default(runtime.clone()); | ||
|
||
let bootstrap = CosmosBootstrap { | ||
runtime, | ||
builder, | ||
should_randomize_identifiers: true, | ||
test_dir: "./test-data".into(), | ||
chain_command_path: "celestia-appd".into(), | ||
account_prefix: "celestia".into(), | ||
compat_mode: Some(CompatMode::V0_34), | ||
staking_denom: Denom::base("utia"), | ||
transfer_denom: Denom::base("coin"), | ||
genesis_config_modifier: Box::new(|_| Ok(())), | ||
comet_config_modifier: Box::new(|_| Ok(())), | ||
}; | ||
|
||
let create_client_settings = ClientSettings::Tendermint(Settings { | ||
max_clock_drift: Duration::from_secs(40), | ||
trusting_period: None, | ||
trust_threshold: TrustThreshold::ONE_THIRD, | ||
}); | ||
|
||
let setup = CosmosBinaryChannelSetup { | ||
bootstrap, | ||
create_client_settings, | ||
init_connection_options: Default::default(), | ||
init_channel_options: Default::default(), | ||
port_id: PortId::transfer(), | ||
}; | ||
|
||
tokio_runtime.block_on(async move { | ||
setup.run_test(&TestIbcTransfer).await?; | ||
|
||
<Result<(), Error>>::Ok(()) | ||
})?; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pub mod bootstrap; | ||
pub mod setup; | ||
pub mod celestia; | ||
pub mod cosmos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.