From 1a93a1b905b1909914f607b0e5906be251de421f Mon Sep 17 00:00:00 2001 From: Soares Chen Date: Tue, 15 Mar 2022 14:03:01 +0100 Subject: [PATCH] Split out test framework from integration tests (#1961) * Split out test framework from integration tests * Fix integration test not triggering * Add changelog * Fix doc tests --- .../1961-test-framework.md | 1 + Cargo.lock | 52 ++++++++++++------- Cargo.toml | 1 + tools/integration-test/Cargo.toml | 20 +------ .../src/bin/test_setup_with_binary_channel.rs | 2 +- tools/integration-test/src/lib.rs | 21 +------- .../src/tests/clear_packet.rs | 6 +-- .../src/tests/client_expiration.rs | 16 +++--- tools/integration-test/src/tests/example.rs | 12 ++--- .../integration-test/src/tests/manual/mod.rs | 2 +- .../src/tests/manual/simulation.rs | 4 +- tools/integration-test/src/tests/memo.rs | 6 +-- .../src/tests/ordered_channel.rs | 6 +-- .../integration-test/src/tests/supervisor.rs | 10 ++-- .../src/tests/ternary_transfer.rs | 4 +- tools/integration-test/src/tests/transfer.rs | 6 +-- .../.gitignore | 0 tools/test-framework/Cargo.toml | 43 +++++++++++++++ .../README.md | 5 -- .../src/bootstrap/binary/chain.rs | 2 +- .../src/bootstrap/binary/channel.rs | 0 .../src/bootstrap/binary/connection.rs | 0 .../src/bootstrap/binary/mod.rs | 0 .../src/bootstrap/init.rs | 0 .../src/bootstrap/mod.rs | 0 .../src/bootstrap/nary/chain.rs | 0 .../src/bootstrap/nary/channel.rs | 0 .../src/bootstrap/nary/connection.rs | 0 .../src/bootstrap/nary/mod.rs | 0 .../src/bootstrap/single.rs | 0 .../src/chain/builder.rs | 0 .../src/chain/config.rs | 0 .../src/chain/driver.rs | 0 .../src/chain/driver/query_txs.rs | 0 .../src/chain/driver/tagged.rs | 0 .../src/chain/driver/transfer.rs | 0 .../src/chain/exec.rs | 0 .../src/chain/mod.rs | 0 .../src/chain/version.rs | 0 .../src/error.rs | 0 .../src/framework/base.rs | 0 .../src/framework/binary/chain.rs | 0 .../src/framework/binary/channel.rs | 0 .../src/framework/binary/connection.rs | 0 .../src/framework/binary/mod.rs | 0 .../src/framework/binary/node.rs | 0 .../src/framework/mod.rs | 0 .../src/framework/nary/chain.rs | 0 .../src/framework/nary/channel.rs | 0 .../src/framework/nary/connection.rs | 0 .../src/framework/nary/mod.rs | 0 .../src/framework/nary/node.rs | 0 .../src/framework/overrides.rs | 0 .../src/ibc/denom.rs | 0 .../src/ibc/mod.rs | 0 tools/test-framework/src/lib.rs | 17 ++++++ .../src/prelude.rs | 0 .../src/relayer/chain.rs | 0 .../src/relayer/channel.rs | 0 .../src/relayer/connection.rs | 0 .../src/relayer/driver.rs | 0 .../src/relayer/foreign_client.rs | 0 .../src/relayer/mod.rs | 0 .../src/relayer/refresh.rs | 0 .../src/relayer/transfer.rs | 0 .../src/types/binary/chains.rs | 0 .../src/types/binary/channel.rs | 0 .../src/types/binary/client.rs | 0 .../src/types/binary/connection.rs | 0 .../src/types/binary/foreign_client.rs | 0 .../src/types/binary/mod.rs | 0 .../src/types/config.rs | 0 .../src/types/env.rs | 0 .../src/types/id.rs | 0 .../src/types/mod.rs | 0 .../src/types/nary/aliases.rs | 0 .../src/types/nary/chains.rs | 0 .../src/types/nary/channel.rs | 0 .../src/types/nary/connection.rs | 0 .../src/types/nary/foreign_client.rs | 0 .../src/types/nary/mod.rs | 0 .../src/types/process.rs | 0 .../src/types/single/mod.rs | 0 .../src/types/single/node.rs | 0 .../src/types/tagged/dual.rs | 34 ++++++------ .../src/types/tagged/mod.rs | 4 +- .../src/types/tagged/mono.rs | 32 ++++++------ .../src/types/wallet.rs | 0 .../src/util/array.rs | 0 .../src/util/assert.rs | 0 .../src/util/file.rs | 0 .../src/util/mod.rs | 0 .../src/util/random.rs | 0 .../src/util/retry.rs | 0 .../src/util/suspend.rs | 0 95 files changed, 171 insertions(+), 135 deletions(-) create mode 100644 .changelog/unreleased/improvements/ibc-integration-test/1961-test-framework.md rename tools/{integration-test => test-framework}/.gitignore (100%) create mode 100644 tools/test-framework/Cargo.toml rename tools/{integration-test => test-framework}/README.md (90%) rename tools/{integration-test => test-framework}/src/bootstrap/binary/chain.rs (99%) rename tools/{integration-test => test-framework}/src/bootstrap/binary/channel.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/binary/connection.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/binary/mod.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/init.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/mod.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/nary/chain.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/nary/channel.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/nary/connection.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/nary/mod.rs (100%) rename tools/{integration-test => test-framework}/src/bootstrap/single.rs (100%) rename tools/{integration-test => test-framework}/src/chain/builder.rs (100%) rename tools/{integration-test => test-framework}/src/chain/config.rs (100%) rename tools/{integration-test => test-framework}/src/chain/driver.rs (100%) rename tools/{integration-test => test-framework}/src/chain/driver/query_txs.rs (100%) rename tools/{integration-test => test-framework}/src/chain/driver/tagged.rs (100%) rename tools/{integration-test => test-framework}/src/chain/driver/transfer.rs (100%) rename tools/{integration-test => test-framework}/src/chain/exec.rs (100%) rename tools/{integration-test => test-framework}/src/chain/mod.rs (100%) rename tools/{integration-test => test-framework}/src/chain/version.rs (100%) rename tools/{integration-test => test-framework}/src/error.rs (100%) rename tools/{integration-test => test-framework}/src/framework/base.rs (100%) rename tools/{integration-test => test-framework}/src/framework/binary/chain.rs (100%) rename tools/{integration-test => test-framework}/src/framework/binary/channel.rs (100%) rename tools/{integration-test => test-framework}/src/framework/binary/connection.rs (100%) rename tools/{integration-test => test-framework}/src/framework/binary/mod.rs (100%) rename tools/{integration-test => test-framework}/src/framework/binary/node.rs (100%) rename tools/{integration-test => test-framework}/src/framework/mod.rs (100%) rename tools/{integration-test => test-framework}/src/framework/nary/chain.rs (100%) rename tools/{integration-test => test-framework}/src/framework/nary/channel.rs (100%) rename tools/{integration-test => test-framework}/src/framework/nary/connection.rs (100%) rename tools/{integration-test => test-framework}/src/framework/nary/mod.rs (100%) rename tools/{integration-test => test-framework}/src/framework/nary/node.rs (100%) rename tools/{integration-test => test-framework}/src/framework/overrides.rs (100%) rename tools/{integration-test => test-framework}/src/ibc/denom.rs (100%) rename tools/{integration-test => test-framework}/src/ibc/mod.rs (100%) create mode 100644 tools/test-framework/src/lib.rs rename tools/{integration-test => test-framework}/src/prelude.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/chain.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/channel.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/connection.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/driver.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/foreign_client.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/mod.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/refresh.rs (100%) rename tools/{integration-test => test-framework}/src/relayer/transfer.rs (100%) rename tools/{integration-test => test-framework}/src/types/binary/chains.rs (100%) rename tools/{integration-test => test-framework}/src/types/binary/channel.rs (100%) rename tools/{integration-test => test-framework}/src/types/binary/client.rs (100%) rename tools/{integration-test => test-framework}/src/types/binary/connection.rs (100%) rename tools/{integration-test => test-framework}/src/types/binary/foreign_client.rs (100%) rename tools/{integration-test => test-framework}/src/types/binary/mod.rs (100%) rename tools/{integration-test => test-framework}/src/types/config.rs (100%) rename tools/{integration-test => test-framework}/src/types/env.rs (100%) rename tools/{integration-test => test-framework}/src/types/id.rs (100%) rename tools/{integration-test => test-framework}/src/types/mod.rs (100%) rename tools/{integration-test => test-framework}/src/types/nary/aliases.rs (100%) rename tools/{integration-test => test-framework}/src/types/nary/chains.rs (100%) rename tools/{integration-test => test-framework}/src/types/nary/channel.rs (100%) rename tools/{integration-test => test-framework}/src/types/nary/connection.rs (100%) rename tools/{integration-test => test-framework}/src/types/nary/foreign_client.rs (100%) rename tools/{integration-test => test-framework}/src/types/nary/mod.rs (100%) rename tools/{integration-test => test-framework}/src/types/process.rs (100%) rename tools/{integration-test => test-framework}/src/types/single/mod.rs (100%) rename tools/{integration-test => test-framework}/src/types/single/node.rs (100%) rename tools/{integration-test => test-framework}/src/types/tagged/dual.rs (91%) rename tools/{integration-test => test-framework}/src/types/tagged/mod.rs (98%) rename tools/{integration-test => test-framework}/src/types/tagged/mono.rs (89%) rename tools/{integration-test => test-framework}/src/types/wallet.rs (100%) rename tools/{integration-test => test-framework}/src/util/array.rs (100%) rename tools/{integration-test => test-framework}/src/util/assert.rs (100%) rename tools/{integration-test => test-framework}/src/util/file.rs (100%) rename tools/{integration-test => test-framework}/src/util/mod.rs (100%) rename tools/{integration-test => test-framework}/src/util/random.rs (100%) rename tools/{integration-test => test-framework}/src/util/retry.rs (100%) rename tools/{integration-test => test-framework}/src/util/suspend.rs (100%) diff --git a/.changelog/unreleased/improvements/ibc-integration-test/1961-test-framework.md b/.changelog/unreleased/improvements/ibc-integration-test/1961-test-framework.md new file mode 100644 index 0000000000..8a998cdd9e --- /dev/null +++ b/.changelog/unreleased/improvements/ibc-integration-test/1961-test-framework.md @@ -0,0 +1 @@ +- Split out test framework as new crate `ibc-test-framework` from `ibc-integration-test`. ([#1961](https://github.com/informalsystems/ibc-rs/pull/1961)) diff --git a/Cargo.lock b/Cargo.lock index 93bb148c24..515eed96c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1377,32 +1377,14 @@ dependencies = [ name = "ibc-integration-test" version = "0.13.0-rc.0" dependencies = [ - "color-eyre", - "crossbeam-channel 0.5.2", - "env_logger", - "eyre", - "flex-error", - "hex", "ibc", "ibc-proto", "ibc-relayer", "ibc-relayer-cli", - "itertools", - "prost", - "prost-types", - "rand 0.8.5", - "semver", - "serde", + "ibc-test-framework", "serde_json", - "serde_yaml", - "sha2 0.10.2", - "subtle-encoding", "tendermint", "tendermint-rpc", - "tokio", - "toml", - "tracing", - "tracing-subscriber", ] [[package]] @@ -1548,6 +1530,38 @@ dependencies = [ "rouille", ] +[[package]] +name = "ibc-test-framework" +version = "0.13.0-rc.0" +dependencies = [ + "color-eyre", + "crossbeam-channel 0.5.2", + "env_logger", + "eyre", + "flex-error", + "hex", + "ibc", + "ibc-proto", + "ibc-relayer", + "ibc-relayer-cli", + "itertools", + "prost", + "prost-types", + "rand 0.8.5", + "semver", + "serde", + "serde_json", + "serde_yaml", + "sha2 0.10.2", + "subtle-encoding", + "tendermint", + "tendermint-rpc", + "tokio", + "toml", + "tracing", + "tracing-subscriber", +] + [[package]] name = "ics23" version = "0.7.0" diff --git a/Cargo.toml b/Cargo.toml index 4519b38832..eaf4e09dfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ members = [ "telemetry", "proto", "tools/integration-test", + "tools/test-framework", ] exclude = [ diff --git a/tools/integration-test/Cargo.toml b/tools/integration-test/Cargo.toml index a21e96a35c..8a7fbbc3ca 100644 --- a/tools/integration-test/Cargo.toml +++ b/tools/integration-test/Cargo.toml @@ -18,29 +18,11 @@ ibc = { path = "../../modules" } ibc-relayer = { path = "../../relayer" } ibc-relayer-cli = { path = "../../relayer-cli" } ibc-proto = { path = "../../proto" } +ibc-test-framework = { path = "../test-framework" } tendermint = { version = "=0.23.5" } tendermint-rpc = { version = "=0.23.5", features = ["http-client", "websocket-client"] } -tokio = { version = "1.0", features = ["full"] } -tracing = "0.1.32" -tracing-subscriber = "0.3.9" -eyre = "0.6.7" -color-eyre = "0.6" -rand = "0.8.5" -env_logger = "0.9.0" -hex = "0.4.3" -serde = "1.0" serde_json = "1" -serde_yaml = "0.8.23" -itertools = "0.10" -toml = "0.5" -subtle-encoding = "0.5.1" -sha2 = "0.10.2" -crossbeam-channel = "0.5.2" -prost = { version = "0.9", default-features = false } -prost-types = { version = "0.9", default-features = false } -semver = "1.0.6" -flex-error = "0.4.4" [features] default = [] diff --git a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs index 06cef0229c..a4ab8c17fa 100644 --- a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs @@ -25,8 +25,8 @@ ``` */ -use ibc_integration_test::prelude::*; use ibc_relayer::keyring::Store; +use ibc_test_framework::prelude::*; struct Test; diff --git a/tools/integration-test/src/lib.rs b/tools/integration-test/src/lib.rs index 4f9fe88a98..192cb697cc 100644 --- a/tools/integration-test/src/lib.rs +++ b/tools/integration-test/src/lib.rs @@ -1,21 +1,2 @@ -// #![deny(warnings)] -#![allow(clippy::too_many_arguments)] -#![allow(clippy::type_complexity)] -#![allow(clippy::ptr_arg)] -#![doc = include_str!("../README.md")] - -extern crate alloc; - -pub mod bootstrap; -pub mod chain; -pub mod error; -pub mod framework; -pub mod ibc; -pub mod prelude; -pub mod relayer; -pub mod types; -pub mod util; - -#[cfg(any(test, doc))] -#[macro_use] +#[cfg(test)] pub mod tests; diff --git a/tools/integration-test/src/tests/clear_packet.rs b/tools/integration-test/src/tests/clear_packet.rs index 195adbf61d..446c94d474 100644 --- a/tools/integration-test/src/tests/clear_packet.rs +++ b/tools/integration-test/src/tests/clear_packet.rs @@ -1,6 +1,6 @@ -use crate::ibc::denom::derive_ibc_denom; -use crate::prelude::*; -use crate::util::random::random_u64_range; +use ibc_test_framework::ibc::denom::derive_ibc_denom; +use ibc_test_framework::prelude::*; +use ibc_test_framework::util::random::random_u64_range; #[test] fn test_clear_packet() -> Result<(), Error> { diff --git a/tools/integration-test/src/tests/client_expiration.rs b/tools/integration-test/src/tests/client_expiration.rs index 82725b4036..c97c378937 100644 --- a/tools/integration-test/src/tests/client_expiration.rs +++ b/tools/integration-test/src/tests/client_expiration.rs @@ -5,20 +5,20 @@ use ibc_relayer::config::default::connection_delay as default_connection_delay; use ibc_relayer::config::{self, Config, ModeConfig}; use std::thread::sleep; -use crate::bootstrap::binary::chain::bootstrap_foreign_client_pair; -use crate::bootstrap::binary::channel::{ +use ibc_test_framework::bootstrap::binary::chain::bootstrap_foreign_client_pair; +use ibc_test_framework::bootstrap::binary::channel::{ bootstrap_channel_with_chains, bootstrap_channel_with_connection, }; -use crate::bootstrap::binary::connection::bootstrap_connection; -use crate::ibc::denom::derive_ibc_denom; -use crate::prelude::*; -use crate::relayer::channel::{ +use ibc_test_framework::bootstrap::binary::connection::bootstrap_connection; +use ibc_test_framework::ibc::denom::derive_ibc_denom; +use ibc_test_framework::prelude::*; +use ibc_test_framework::relayer::channel::{ assert_eventually_channel_established, init_channel, query_channel_end, }; -use crate::relayer::connection::{ +use ibc_test_framework::relayer::connection::{ assert_eventually_connection_established, init_connection, query_connection_end, }; -use crate::relayer::refresh::spawn_refresh_client_tasks; +use ibc_test_framework::relayer::refresh::spawn_refresh_client_tasks; // The cosmos ChainHandle handles requests in serial, and a refresh client // request may get blocked by other operations and cause the refresh to fail diff --git a/tools/integration-test/src/tests/example.rs b/tools/integration-test/src/tests/example.rs index dcc4496c6f..0a3878589a 100644 --- a/tools/integration-test/src/tests/example.rs +++ b/tools/integration-test/src/tests/example.rs @@ -28,7 +28,7 @@ We first define an empty struct [`ExampleTest`] to represent our test case. We then implement the - [`BinaryChannelTest`](crate::framework::binary::channel::BinaryChannelTest) + [`BinaryChannelTest`](ibc_test_framework::framework::binary::channel::BinaryChannelTest) trait so that the test framework sets up the relayer with two chains running together with connected channels. @@ -44,12 +44,12 @@ Finally, we define the `example_test` function with the `#[test]` pragma as the entry point for Rust to execute the test. We call the runner function - [`run_binary_channel_test`](crate::framework::binary::channel::run_binary_channel_test), + [`run_binary_channel_test`](ibc_test_framework::framework::binary::channel::run_binary_channel_test), which accepts a reference to any struct implementing - [`BinaryChannelTest`](crate::framework::binary::channel::BinaryChannelTest) + [`BinaryChannelTest`](ibc_test_framework::framework::binary::channel::BinaryChannelTest) and run the test for us. - By convention, the tests written are placed in the [`tests`](crate::tests) + By convention, the tests written are placed in the [`tests`](ibc_test_framework::tests) module. We can then run the test on the command line such as follows: ```bash @@ -62,7 +62,7 @@ and `RUST_BACKTRACE` to display backtrace when errors occurred. The test flag `--test-threads=1` is set so that Rust do not run multiple tests in parallel, as it can make it difficult to follow the logs. - See [TestConfig](crate::types::config::TestConfig) for more information + See [TestConfig](ibc_test_framework::types::config::TestConfig) for more information about configuring how the tests should be run. For this example, we disable the test from running by default, since @@ -112,7 +112,7 @@ same directory. */ -use crate::prelude::*; +use ibc_test_framework::prelude::*; #[test] pub fn example_test() -> Result<(), Error> { diff --git a/tools/integration-test/src/tests/manual/mod.rs b/tools/integration-test/src/tests/manual/mod.rs index 4bbf560524..fbf4121f9b 100644 --- a/tools/integration-test/src/tests/manual/mod.rs +++ b/tools/integration-test/src/tests/manual/mod.rs @@ -7,7 +7,7 @@ are only enabled when the `"manual"` feature flag is enabled manually. Any tests that require manual verification should be placed here. - It is also fine to use [`suspend`](crate::util::suspend::suspend) + It is also fine to use [`suspend`](ibc_test_framework::util::suspend::suspend) inside the manual test, as the CI is not going to run the test. */ diff --git a/tools/integration-test/src/tests/manual/simulation.rs b/tools/integration-test/src/tests/manual/simulation.rs index 8e54b4004c..71992f4120 100644 --- a/tools/integration-test/src/tests/manual/simulation.rs +++ b/tools/integration-test/src/tests/manual/simulation.rs @@ -14,8 +14,8 @@ use core::time::Duration; use ibc_relayer::config::{types::MaxMsgNum, Config}; -use crate::prelude::*; -use crate::relayer::transfer::tx_raw_ft_transfer; +use ibc_test_framework::prelude::*; +use ibc_test_framework::relayer::transfer::tx_raw_ft_transfer; #[test] fn test_simulation() -> Result<(), Error> { diff --git a/tools/integration-test/src/tests/memo.rs b/tools/integration-test/src/tests/memo.rs index 43287a6fa0..e8a131e775 100644 --- a/tools/integration-test/src/tests/memo.rs +++ b/tools/integration-test/src/tests/memo.rs @@ -1,9 +1,9 @@ use ibc_relayer::config::{types::Memo, Config}; use serde_json as json; -use crate::ibc::denom::derive_ibc_denom; -use crate::prelude::*; -use crate::util::random::{random_string, random_u64_range}; +use ibc_test_framework::ibc::denom::derive_ibc_denom; +use ibc_test_framework::prelude::*; +use ibc_test_framework::util::random::{random_string, random_u64_range}; #[test] fn test_memo() -> Result<(), Error> { diff --git a/tools/integration-test/src/tests/ordered_channel.rs b/tools/integration-test/src/tests/ordered_channel.rs index 64ac236a03..5ffb28278a 100644 --- a/tools/integration-test/src/tests/ordered_channel.rs +++ b/tools/integration-test/src/tests/ordered_channel.rs @@ -1,6 +1,6 @@ -use crate::ibc::denom::derive_ibc_denom; -use crate::prelude::*; -use crate::util::random::random_u64_range; +use ibc_test_framework::ibc::denom::derive_ibc_denom; +use ibc_test_framework::prelude::*; +use ibc_test_framework::util::random::random_u64_range; #[test] fn test_ordered_channel() -> Result<(), Error> { diff --git a/tools/integration-test/src/tests/supervisor.rs b/tools/integration-test/src/tests/supervisor.rs index 5450253de7..7b9e171b3b 100644 --- a/tools/integration-test/src/tests/supervisor.rs +++ b/tools/integration-test/src/tests/supervisor.rs @@ -1,9 +1,11 @@ -use crate::ibc::denom::derive_ibc_denom; use ibc_relayer::config::{self, Config, ModeConfig}; +use ibc_test_framework::ibc::denom::derive_ibc_denom; -use crate::prelude::*; -use crate::relayer::channel::{assert_eventually_channel_established, init_channel}; -use crate::relayer::connection::{assert_eventually_connection_established, init_connection}; +use ibc_test_framework::prelude::*; +use ibc_test_framework::relayer::channel::{assert_eventually_channel_established, init_channel}; +use ibc_test_framework::relayer::connection::{ + assert_eventually_connection_established, init_connection, +}; #[test] fn test_supervisor() -> Result<(), Error> { diff --git a/tools/integration-test/src/tests/ternary_transfer.rs b/tools/integration-test/src/tests/ternary_transfer.rs index 2113223d95..15eac7f246 100644 --- a/tools/integration-test/src/tests/ternary_transfer.rs +++ b/tools/integration-test/src/tests/ternary_transfer.rs @@ -1,5 +1,5 @@ -use crate::ibc::denom::derive_ibc_denom; -use crate::prelude::*; +use ibc_test_framework::ibc::denom::derive_ibc_denom; +use ibc_test_framework::prelude::*; #[test] fn test_ternary_ibc_transfer() -> Result<(), Error> { diff --git a/tools/integration-test/src/tests/transfer.rs b/tools/integration-test/src/tests/transfer.rs index f89c2f2925..8d7dbc5db0 100644 --- a/tools/integration-test/src/tests/transfer.rs +++ b/tools/integration-test/src/tests/transfer.rs @@ -1,6 +1,6 @@ -use crate::ibc::denom::derive_ibc_denom; -use crate::prelude::*; -use crate::util::random::random_u64_range; +use ibc_test_framework::ibc::denom::derive_ibc_denom; +use ibc_test_framework::prelude::*; +use ibc_test_framework::util::random::random_u64_range; #[test] fn test_ibc_transfer() -> Result<(), Error> { diff --git a/tools/integration-test/.gitignore b/tools/test-framework/.gitignore similarity index 100% rename from tools/integration-test/.gitignore rename to tools/test-framework/.gitignore diff --git a/tools/test-framework/Cargo.toml b/tools/test-framework/Cargo.toml new file mode 100644 index 0000000000..f661425b50 --- /dev/null +++ b/tools/test-framework/Cargo.toml @@ -0,0 +1,43 @@ +[package] +name = "ibc-test-framework" +version = "0.13.0-rc.0" +edition = "2021" +license = "Apache-2.0" +readme = "README.md" +keywords = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"] +homepage = "https://hermes.informal.systems/" +repository = "https://github.com/informalsystems/ibc-rs" +authors = ["Informal Systems "] + +description = """ + Integration tests for IBC Relayer +""" + +[dependencies] +ibc = { path = "../../modules" } +ibc-relayer = { path = "../../relayer" } +ibc-relayer-cli = { path = "../../relayer-cli" } +ibc-proto = { path = "../../proto" } +tendermint = { version = "=0.23.5" } +tendermint-rpc = { version = "=0.23.5", features = ["http-client", "websocket-client"] } + +tokio = { version = "1.0", features = ["full"] } +tracing = "0.1.32" +tracing-subscriber = "0.3.9" +eyre = "0.6.7" +color-eyre = "0.6" +rand = "0.8.5" +env_logger = "0.9.0" +hex = "0.4.3" +serde = "1.0" +serde_json = "1" +serde_yaml = "0.8.23" +itertools = "0.10" +toml = "0.5" +subtle-encoding = "0.5.1" +sha2 = "0.10.2" +crossbeam-channel = "0.5.2" +prost = { version = "0.9", default-features = false } +prost-types = { version = "0.9", default-features = false } +semver = "1.0.6" +flex-error = "0.4.4" diff --git a/tools/integration-test/README.md b/tools/test-framework/README.md similarity index 90% rename from tools/integration-test/README.md rename to tools/test-framework/README.md index df1e5173b0..ad3cbf955a 100644 --- a/tools/integration-test/README.md +++ b/tools/test-framework/README.md @@ -20,11 +20,6 @@ Other than Rust, the test suite assumes the `gaiad` binary is present in `$PATH` nix shell github:informalsystems/cosmos.nix#gaia5 ``` -## Quick Start - -See [`tests::example`](crate::tests::example) for an example test with -access to a full test setup. - ## Diagrams Some diagrams have been prepared to ease the understanding of the test framework: diff --git a/tools/integration-test/src/bootstrap/binary/chain.rs b/tools/test-framework/src/bootstrap/binary/chain.rs similarity index 99% rename from tools/integration-test/src/bootstrap/binary/chain.rs rename to tools/test-framework/src/bootstrap/binary/chain.rs index 78e727619b..a1ebbd3f83 100644 --- a/tools/integration-test/src/bootstrap/binary/chain.rs +++ b/tools/test-framework/src/bootstrap/binary/chain.rs @@ -189,7 +189,7 @@ pub fn bootstrap_foreign_client( For example, the following test should fail to compile: ```rust,compile_fail - # use ibc_integration_test::bootstrap::binary::chain::spawn_chain_handle; + # use ibc_test_framework::bootstrap::binary::chain::spawn_chain_handle; fn same(_: T, _: T) {} let chain_a = spawn_chain_handle(|| {}, todo!(), todo!()).unwrap(); diff --git a/tools/integration-test/src/bootstrap/binary/channel.rs b/tools/test-framework/src/bootstrap/binary/channel.rs similarity index 100% rename from tools/integration-test/src/bootstrap/binary/channel.rs rename to tools/test-framework/src/bootstrap/binary/channel.rs diff --git a/tools/integration-test/src/bootstrap/binary/connection.rs b/tools/test-framework/src/bootstrap/binary/connection.rs similarity index 100% rename from tools/integration-test/src/bootstrap/binary/connection.rs rename to tools/test-framework/src/bootstrap/binary/connection.rs diff --git a/tools/integration-test/src/bootstrap/binary/mod.rs b/tools/test-framework/src/bootstrap/binary/mod.rs similarity index 100% rename from tools/integration-test/src/bootstrap/binary/mod.rs rename to tools/test-framework/src/bootstrap/binary/mod.rs diff --git a/tools/integration-test/src/bootstrap/init.rs b/tools/test-framework/src/bootstrap/init.rs similarity index 100% rename from tools/integration-test/src/bootstrap/init.rs rename to tools/test-framework/src/bootstrap/init.rs diff --git a/tools/integration-test/src/bootstrap/mod.rs b/tools/test-framework/src/bootstrap/mod.rs similarity index 100% rename from tools/integration-test/src/bootstrap/mod.rs rename to tools/test-framework/src/bootstrap/mod.rs diff --git a/tools/integration-test/src/bootstrap/nary/chain.rs b/tools/test-framework/src/bootstrap/nary/chain.rs similarity index 100% rename from tools/integration-test/src/bootstrap/nary/chain.rs rename to tools/test-framework/src/bootstrap/nary/chain.rs diff --git a/tools/integration-test/src/bootstrap/nary/channel.rs b/tools/test-framework/src/bootstrap/nary/channel.rs similarity index 100% rename from tools/integration-test/src/bootstrap/nary/channel.rs rename to tools/test-framework/src/bootstrap/nary/channel.rs diff --git a/tools/integration-test/src/bootstrap/nary/connection.rs b/tools/test-framework/src/bootstrap/nary/connection.rs similarity index 100% rename from tools/integration-test/src/bootstrap/nary/connection.rs rename to tools/test-framework/src/bootstrap/nary/connection.rs diff --git a/tools/integration-test/src/bootstrap/nary/mod.rs b/tools/test-framework/src/bootstrap/nary/mod.rs similarity index 100% rename from tools/integration-test/src/bootstrap/nary/mod.rs rename to tools/test-framework/src/bootstrap/nary/mod.rs diff --git a/tools/integration-test/src/bootstrap/single.rs b/tools/test-framework/src/bootstrap/single.rs similarity index 100% rename from tools/integration-test/src/bootstrap/single.rs rename to tools/test-framework/src/bootstrap/single.rs diff --git a/tools/integration-test/src/chain/builder.rs b/tools/test-framework/src/chain/builder.rs similarity index 100% rename from tools/integration-test/src/chain/builder.rs rename to tools/test-framework/src/chain/builder.rs diff --git a/tools/integration-test/src/chain/config.rs b/tools/test-framework/src/chain/config.rs similarity index 100% rename from tools/integration-test/src/chain/config.rs rename to tools/test-framework/src/chain/config.rs diff --git a/tools/integration-test/src/chain/driver.rs b/tools/test-framework/src/chain/driver.rs similarity index 100% rename from tools/integration-test/src/chain/driver.rs rename to tools/test-framework/src/chain/driver.rs diff --git a/tools/integration-test/src/chain/driver/query_txs.rs b/tools/test-framework/src/chain/driver/query_txs.rs similarity index 100% rename from tools/integration-test/src/chain/driver/query_txs.rs rename to tools/test-framework/src/chain/driver/query_txs.rs diff --git a/tools/integration-test/src/chain/driver/tagged.rs b/tools/test-framework/src/chain/driver/tagged.rs similarity index 100% rename from tools/integration-test/src/chain/driver/tagged.rs rename to tools/test-framework/src/chain/driver/tagged.rs diff --git a/tools/integration-test/src/chain/driver/transfer.rs b/tools/test-framework/src/chain/driver/transfer.rs similarity index 100% rename from tools/integration-test/src/chain/driver/transfer.rs rename to tools/test-framework/src/chain/driver/transfer.rs diff --git a/tools/integration-test/src/chain/exec.rs b/tools/test-framework/src/chain/exec.rs similarity index 100% rename from tools/integration-test/src/chain/exec.rs rename to tools/test-framework/src/chain/exec.rs diff --git a/tools/integration-test/src/chain/mod.rs b/tools/test-framework/src/chain/mod.rs similarity index 100% rename from tools/integration-test/src/chain/mod.rs rename to tools/test-framework/src/chain/mod.rs diff --git a/tools/integration-test/src/chain/version.rs b/tools/test-framework/src/chain/version.rs similarity index 100% rename from tools/integration-test/src/chain/version.rs rename to tools/test-framework/src/chain/version.rs diff --git a/tools/integration-test/src/error.rs b/tools/test-framework/src/error.rs similarity index 100% rename from tools/integration-test/src/error.rs rename to tools/test-framework/src/error.rs diff --git a/tools/integration-test/src/framework/base.rs b/tools/test-framework/src/framework/base.rs similarity index 100% rename from tools/integration-test/src/framework/base.rs rename to tools/test-framework/src/framework/base.rs diff --git a/tools/integration-test/src/framework/binary/chain.rs b/tools/test-framework/src/framework/binary/chain.rs similarity index 100% rename from tools/integration-test/src/framework/binary/chain.rs rename to tools/test-framework/src/framework/binary/chain.rs diff --git a/tools/integration-test/src/framework/binary/channel.rs b/tools/test-framework/src/framework/binary/channel.rs similarity index 100% rename from tools/integration-test/src/framework/binary/channel.rs rename to tools/test-framework/src/framework/binary/channel.rs diff --git a/tools/integration-test/src/framework/binary/connection.rs b/tools/test-framework/src/framework/binary/connection.rs similarity index 100% rename from tools/integration-test/src/framework/binary/connection.rs rename to tools/test-framework/src/framework/binary/connection.rs diff --git a/tools/integration-test/src/framework/binary/mod.rs b/tools/test-framework/src/framework/binary/mod.rs similarity index 100% rename from tools/integration-test/src/framework/binary/mod.rs rename to tools/test-framework/src/framework/binary/mod.rs diff --git a/tools/integration-test/src/framework/binary/node.rs b/tools/test-framework/src/framework/binary/node.rs similarity index 100% rename from tools/integration-test/src/framework/binary/node.rs rename to tools/test-framework/src/framework/binary/node.rs diff --git a/tools/integration-test/src/framework/mod.rs b/tools/test-framework/src/framework/mod.rs similarity index 100% rename from tools/integration-test/src/framework/mod.rs rename to tools/test-framework/src/framework/mod.rs diff --git a/tools/integration-test/src/framework/nary/chain.rs b/tools/test-framework/src/framework/nary/chain.rs similarity index 100% rename from tools/integration-test/src/framework/nary/chain.rs rename to tools/test-framework/src/framework/nary/chain.rs diff --git a/tools/integration-test/src/framework/nary/channel.rs b/tools/test-framework/src/framework/nary/channel.rs similarity index 100% rename from tools/integration-test/src/framework/nary/channel.rs rename to tools/test-framework/src/framework/nary/channel.rs diff --git a/tools/integration-test/src/framework/nary/connection.rs b/tools/test-framework/src/framework/nary/connection.rs similarity index 100% rename from tools/integration-test/src/framework/nary/connection.rs rename to tools/test-framework/src/framework/nary/connection.rs diff --git a/tools/integration-test/src/framework/nary/mod.rs b/tools/test-framework/src/framework/nary/mod.rs similarity index 100% rename from tools/integration-test/src/framework/nary/mod.rs rename to tools/test-framework/src/framework/nary/mod.rs diff --git a/tools/integration-test/src/framework/nary/node.rs b/tools/test-framework/src/framework/nary/node.rs similarity index 100% rename from tools/integration-test/src/framework/nary/node.rs rename to tools/test-framework/src/framework/nary/node.rs diff --git a/tools/integration-test/src/framework/overrides.rs b/tools/test-framework/src/framework/overrides.rs similarity index 100% rename from tools/integration-test/src/framework/overrides.rs rename to tools/test-framework/src/framework/overrides.rs diff --git a/tools/integration-test/src/ibc/denom.rs b/tools/test-framework/src/ibc/denom.rs similarity index 100% rename from tools/integration-test/src/ibc/denom.rs rename to tools/test-framework/src/ibc/denom.rs diff --git a/tools/integration-test/src/ibc/mod.rs b/tools/test-framework/src/ibc/mod.rs similarity index 100% rename from tools/integration-test/src/ibc/mod.rs rename to tools/test-framework/src/ibc/mod.rs diff --git a/tools/test-framework/src/lib.rs b/tools/test-framework/src/lib.rs new file mode 100644 index 0000000000..aaeca1e376 --- /dev/null +++ b/tools/test-framework/src/lib.rs @@ -0,0 +1,17 @@ +// #![deny(warnings)] +#![allow(clippy::too_many_arguments)] +#![allow(clippy::type_complexity)] +#![allow(clippy::ptr_arg)] +#![doc = include_str!("../README.md")] + +extern crate alloc; + +pub mod bootstrap; +pub mod chain; +pub mod error; +pub mod framework; +pub mod ibc; +pub mod prelude; +pub mod relayer; +pub mod types; +pub mod util; diff --git a/tools/integration-test/src/prelude.rs b/tools/test-framework/src/prelude.rs similarity index 100% rename from tools/integration-test/src/prelude.rs rename to tools/test-framework/src/prelude.rs diff --git a/tools/integration-test/src/relayer/chain.rs b/tools/test-framework/src/relayer/chain.rs similarity index 100% rename from tools/integration-test/src/relayer/chain.rs rename to tools/test-framework/src/relayer/chain.rs diff --git a/tools/integration-test/src/relayer/channel.rs b/tools/test-framework/src/relayer/channel.rs similarity index 100% rename from tools/integration-test/src/relayer/channel.rs rename to tools/test-framework/src/relayer/channel.rs diff --git a/tools/integration-test/src/relayer/connection.rs b/tools/test-framework/src/relayer/connection.rs similarity index 100% rename from tools/integration-test/src/relayer/connection.rs rename to tools/test-framework/src/relayer/connection.rs diff --git a/tools/integration-test/src/relayer/driver.rs b/tools/test-framework/src/relayer/driver.rs similarity index 100% rename from tools/integration-test/src/relayer/driver.rs rename to tools/test-framework/src/relayer/driver.rs diff --git a/tools/integration-test/src/relayer/foreign_client.rs b/tools/test-framework/src/relayer/foreign_client.rs similarity index 100% rename from tools/integration-test/src/relayer/foreign_client.rs rename to tools/test-framework/src/relayer/foreign_client.rs diff --git a/tools/integration-test/src/relayer/mod.rs b/tools/test-framework/src/relayer/mod.rs similarity index 100% rename from tools/integration-test/src/relayer/mod.rs rename to tools/test-framework/src/relayer/mod.rs diff --git a/tools/integration-test/src/relayer/refresh.rs b/tools/test-framework/src/relayer/refresh.rs similarity index 100% rename from tools/integration-test/src/relayer/refresh.rs rename to tools/test-framework/src/relayer/refresh.rs diff --git a/tools/integration-test/src/relayer/transfer.rs b/tools/test-framework/src/relayer/transfer.rs similarity index 100% rename from tools/integration-test/src/relayer/transfer.rs rename to tools/test-framework/src/relayer/transfer.rs diff --git a/tools/integration-test/src/types/binary/chains.rs b/tools/test-framework/src/types/binary/chains.rs similarity index 100% rename from tools/integration-test/src/types/binary/chains.rs rename to tools/test-framework/src/types/binary/chains.rs diff --git a/tools/integration-test/src/types/binary/channel.rs b/tools/test-framework/src/types/binary/channel.rs similarity index 100% rename from tools/integration-test/src/types/binary/channel.rs rename to tools/test-framework/src/types/binary/channel.rs diff --git a/tools/integration-test/src/types/binary/client.rs b/tools/test-framework/src/types/binary/client.rs similarity index 100% rename from tools/integration-test/src/types/binary/client.rs rename to tools/test-framework/src/types/binary/client.rs diff --git a/tools/integration-test/src/types/binary/connection.rs b/tools/test-framework/src/types/binary/connection.rs similarity index 100% rename from tools/integration-test/src/types/binary/connection.rs rename to tools/test-framework/src/types/binary/connection.rs diff --git a/tools/integration-test/src/types/binary/foreign_client.rs b/tools/test-framework/src/types/binary/foreign_client.rs similarity index 100% rename from tools/integration-test/src/types/binary/foreign_client.rs rename to tools/test-framework/src/types/binary/foreign_client.rs diff --git a/tools/integration-test/src/types/binary/mod.rs b/tools/test-framework/src/types/binary/mod.rs similarity index 100% rename from tools/integration-test/src/types/binary/mod.rs rename to tools/test-framework/src/types/binary/mod.rs diff --git a/tools/integration-test/src/types/config.rs b/tools/test-framework/src/types/config.rs similarity index 100% rename from tools/integration-test/src/types/config.rs rename to tools/test-framework/src/types/config.rs diff --git a/tools/integration-test/src/types/env.rs b/tools/test-framework/src/types/env.rs similarity index 100% rename from tools/integration-test/src/types/env.rs rename to tools/test-framework/src/types/env.rs diff --git a/tools/integration-test/src/types/id.rs b/tools/test-framework/src/types/id.rs similarity index 100% rename from tools/integration-test/src/types/id.rs rename to tools/test-framework/src/types/id.rs diff --git a/tools/integration-test/src/types/mod.rs b/tools/test-framework/src/types/mod.rs similarity index 100% rename from tools/integration-test/src/types/mod.rs rename to tools/test-framework/src/types/mod.rs diff --git a/tools/integration-test/src/types/nary/aliases.rs b/tools/test-framework/src/types/nary/aliases.rs similarity index 100% rename from tools/integration-test/src/types/nary/aliases.rs rename to tools/test-framework/src/types/nary/aliases.rs diff --git a/tools/integration-test/src/types/nary/chains.rs b/tools/test-framework/src/types/nary/chains.rs similarity index 100% rename from tools/integration-test/src/types/nary/chains.rs rename to tools/test-framework/src/types/nary/chains.rs diff --git a/tools/integration-test/src/types/nary/channel.rs b/tools/test-framework/src/types/nary/channel.rs similarity index 100% rename from tools/integration-test/src/types/nary/channel.rs rename to tools/test-framework/src/types/nary/channel.rs diff --git a/tools/integration-test/src/types/nary/connection.rs b/tools/test-framework/src/types/nary/connection.rs similarity index 100% rename from tools/integration-test/src/types/nary/connection.rs rename to tools/test-framework/src/types/nary/connection.rs diff --git a/tools/integration-test/src/types/nary/foreign_client.rs b/tools/test-framework/src/types/nary/foreign_client.rs similarity index 100% rename from tools/integration-test/src/types/nary/foreign_client.rs rename to tools/test-framework/src/types/nary/foreign_client.rs diff --git a/tools/integration-test/src/types/nary/mod.rs b/tools/test-framework/src/types/nary/mod.rs similarity index 100% rename from tools/integration-test/src/types/nary/mod.rs rename to tools/test-framework/src/types/nary/mod.rs diff --git a/tools/integration-test/src/types/process.rs b/tools/test-framework/src/types/process.rs similarity index 100% rename from tools/integration-test/src/types/process.rs rename to tools/test-framework/src/types/process.rs diff --git a/tools/integration-test/src/types/single/mod.rs b/tools/test-framework/src/types/single/mod.rs similarity index 100% rename from tools/integration-test/src/types/single/mod.rs rename to tools/test-framework/src/types/single/mod.rs diff --git a/tools/integration-test/src/types/single/node.rs b/tools/test-framework/src/types/single/node.rs similarity index 100% rename from tools/integration-test/src/types/single/node.rs rename to tools/test-framework/src/types/single/node.rs diff --git a/tools/integration-test/src/types/tagged/dual.rs b/tools/test-framework/src/types/tagged/dual.rs similarity index 91% rename from tools/integration-test/src/types/tagged/dual.rs rename to tools/test-framework/src/types/tagged/dual.rs index c967268ff2..78c741b76a 100644 --- a/tools/integration-test/src/types/tagged/dual.rs +++ b/tools/test-framework/src/types/tagged/dual.rs @@ -29,7 +29,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -46,7 +46,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -64,7 +64,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -82,7 +82,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -100,7 +100,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -118,7 +118,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; struct Baz; @@ -139,7 +139,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -158,7 +158,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Person { name: String, age: u8 } struct Alice; struct Wonderland; @@ -186,7 +186,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Person { name: String, age: u8 } struct Alice; struct Wonderland; @@ -210,7 +210,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -225,7 +225,7 @@ impl Tagged { ```rust # use ibc::core::ics24_host::identifier::ConnectionId; - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct ConnectionEnd { connection_id: ConnectionId, counterparty_connection_id: ConnectionId, @@ -270,7 +270,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Person { name: String, age: u8 } struct Alice; struct Wonderland; @@ -298,7 +298,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -318,7 +318,7 @@ impl<'a, TagA, TagB, Value: Clone> Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -343,7 +343,7 @@ impl Tagged> { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; @@ -363,7 +363,7 @@ impl Tagged> { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; struct Error; @@ -433,7 +433,7 @@ impl Ord for Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::dual::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged; struct Foo; struct Bar; diff --git a/tools/integration-test/src/types/tagged/mod.rs b/tools/test-framework/src/types/tagged/mod.rs similarity index 98% rename from tools/integration-test/src/types/tagged/mod.rs rename to tools/test-framework/src/types/tagged/mod.rs index 885d0c957f..50f75dc6ca 100644 --- a/tools/integration-test/src/types/tagged/mod.rs +++ b/tools/test-framework/src/types/tagged/mod.rs @@ -10,7 +10,7 @@ different types. ```rust,compile_fail - # use ibc_integration_test::types::tagged::*; + # use ibc_test_framework::types::tagged::*; struct Foo; struct Bar; @@ -37,7 +37,7 @@ For example, it is entirely fine to do something like: ```rust - # use ibc_integration_test::types::tagged::*; + # use ibc_test_framework::types::tagged::*; struct Foo; struct Bar; struct Baz; diff --git a/tools/integration-test/src/types/tagged/mono.rs b/tools/test-framework/src/types/tagged/mono.rs similarity index 89% rename from tools/integration-test/src/types/tagged/mono.rs rename to tools/test-framework/src/types/tagged/mono.rs index 13e4d04768..af7d0564e6 100644 --- a/tools/integration-test/src/types/tagged/mono.rs +++ b/tools/test-framework/src/types/tagged/mono.rs @@ -37,7 +37,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val: Tagged = Tagged::new(42); @@ -53,7 +53,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val1: Tagged = Tagged::new(42); @@ -70,7 +70,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let mut val1: Tagged = Tagged::new(42); @@ -87,7 +87,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val1: Tagged = Tagged::new(42); @@ -104,7 +104,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val1: Tagged = Tagged::new(42); @@ -121,7 +121,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; struct Bar; @@ -140,8 +140,8 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; - # use ibc_integration_test::types::tagged::dual::Tagged as DualTagged; + # use ibc_test_framework::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::dual::Tagged as DualTagged; struct Foo; struct Bar; @@ -160,7 +160,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val1: Tagged = Tagged::new(42); @@ -178,7 +178,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Person { name: String, age: u8 } struct Alice; @@ -204,7 +204,7 @@ impl Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Person { name: String, age: u8 } struct Alice; @@ -228,7 +228,7 @@ impl<'a, Tag, Value: Clone> Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val1: String = "foo".to_string(); @@ -252,7 +252,7 @@ impl Tagged> { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val1: Tagged> = Tagged::new(Some(8)); @@ -271,7 +271,7 @@ impl Tagged> { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; struct Error; @@ -291,7 +291,7 @@ impl Tagged> { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let val1: Tagged> = Tagged::new(vec![1, 2, 3]); @@ -330,7 +330,7 @@ impl Serialize for Tagged { Example: ```rust - # use ibc_integration_test::types::tagged::mono::Tagged; + # use ibc_test_framework::types::tagged::mono::Tagged; struct Foo; let values: Tagged> = Tagged::new(vec![1, 2, 3]); diff --git a/tools/integration-test/src/types/wallet.rs b/tools/test-framework/src/types/wallet.rs similarity index 100% rename from tools/integration-test/src/types/wallet.rs rename to tools/test-framework/src/types/wallet.rs diff --git a/tools/integration-test/src/util/array.rs b/tools/test-framework/src/util/array.rs similarity index 100% rename from tools/integration-test/src/util/array.rs rename to tools/test-framework/src/util/array.rs diff --git a/tools/integration-test/src/util/assert.rs b/tools/test-framework/src/util/assert.rs similarity index 100% rename from tools/integration-test/src/util/assert.rs rename to tools/test-framework/src/util/assert.rs diff --git a/tools/integration-test/src/util/file.rs b/tools/test-framework/src/util/file.rs similarity index 100% rename from tools/integration-test/src/util/file.rs rename to tools/test-framework/src/util/file.rs diff --git a/tools/integration-test/src/util/mod.rs b/tools/test-framework/src/util/mod.rs similarity index 100% rename from tools/integration-test/src/util/mod.rs rename to tools/test-framework/src/util/mod.rs diff --git a/tools/integration-test/src/util/random.rs b/tools/test-framework/src/util/random.rs similarity index 100% rename from tools/integration-test/src/util/random.rs rename to tools/test-framework/src/util/random.rs diff --git a/tools/integration-test/src/util/retry.rs b/tools/test-framework/src/util/retry.rs similarity index 100% rename from tools/integration-test/src/util/retry.rs rename to tools/test-framework/src/util/retry.rs diff --git a/tools/integration-test/src/util/suspend.rs b/tools/test-framework/src/util/suspend.rs similarity index 100% rename from tools/integration-test/src/util/suspend.rs rename to tools/test-framework/src/util/suspend.rs