diff --git a/xmr-btc/tests/e2e.rs b/xmr-btc/tests/e2e.rs index b0174cec..6693ce00 100644 --- a/xmr-btc/tests/e2e.rs +++ b/xmr-btc/tests/e2e.rs @@ -1,8 +1,9 @@ -use crate::{ +use crate::harness::wallet; +use bitcoin_harness::Bitcoind; +use harness::{ node::{AliceNode, BobNode}, transport::Transport, }; -use bitcoin_harness::Bitcoind; use monero_harness::Monero; use rand::rngs::OsRng; use testcontainers::clients::Cli; @@ -12,9 +13,7 @@ use tokio::sync::{ }; use xmr_btc::{alice, bitcoin, bob, monero}; -mod node; -mod transport; -mod wallet; +mod harness; const TEN_XMR: u64 = 10_000_000_000_000; const RELATIVE_REFUND_TIMELOCK: u32 = 1; @@ -146,8 +145,8 @@ pub async fn init_test<'a>( #[cfg(test)] mod tests { use crate::{ + harness::node::{run_alice_until, run_bob_until}, init_bitcoind, init_test, - node::{run_alice_until, run_bob_until}, }; use monero_harness::Monero; diff --git a/xmr-btc/tests/harness/mod.rs b/xmr-btc/tests/harness/mod.rs new file mode 100644 index 00000000..38d3808a --- /dev/null +++ b/xmr-btc/tests/harness/mod.rs @@ -0,0 +1,3 @@ +pub mod node; +pub mod transport; +pub mod wallet; diff --git a/xmr-btc/tests/node.rs b/xmr-btc/tests/harness/node.rs similarity index 97% rename from xmr-btc/tests/node.rs rename to xmr-btc/tests/harness/node.rs index 74351a64..88ee0a6a 100644 --- a/xmr-btc/tests/node.rs +++ b/xmr-btc/tests/harness/node.rs @@ -1,4 +1,4 @@ -use crate::{transport::Transport, wallet}; +use crate::harness::{transport::Transport, wallet}; use anyhow::Result; use rand::{CryptoRng, RngCore}; use xmr_btc::{alice, bob}; diff --git a/xmr-btc/tests/transport.rs b/xmr-btc/tests/harness/transport.rs similarity index 100% rename from xmr-btc/tests/transport.rs rename to xmr-btc/tests/harness/transport.rs diff --git a/xmr-btc/tests/wallet/bitcoin.rs b/xmr-btc/tests/harness/wallet/bitcoin.rs similarity index 100% rename from xmr-btc/tests/wallet/bitcoin.rs rename to xmr-btc/tests/harness/wallet/bitcoin.rs diff --git a/xmr-btc/tests/wallet/mod.rs b/xmr-btc/tests/harness/wallet/mod.rs similarity index 100% rename from xmr-btc/tests/wallet/mod.rs rename to xmr-btc/tests/harness/wallet/mod.rs diff --git a/xmr-btc/tests/wallet/monero.rs b/xmr-btc/tests/harness/wallet/monero.rs similarity index 100% rename from xmr-btc/tests/wallet/monero.rs rename to xmr-btc/tests/harness/wallet/monero.rs