Run swap e2e test without tor feature

Not worth automatically testing both `tor` and `not(tor)`, it should
not make a difference.
This commit is contained in:
Lucas Soriano del Pino 2020-11-02 10:31:53 +11:00
parent 792fa351c8
commit 92c7e8e84f

View File

@ -1,14 +1,16 @@
use bitcoin_harness::Bitcoind; #[cfg(not(feature = "tor"))]
use futures::{channel::mpsc, future::try_join}; mod e2e_test {
use libp2p::Multiaddr; use bitcoin_harness::Bitcoind;
use monero_harness::Monero; use futures::{channel::mpsc, future::try_join};
use std::sync::Arc; use libp2p::Multiaddr;
use swap::{alice, bob}; use monero_harness::Monero;
use testcontainers::clients::Cli; use std::sync::Arc;
use tracing_subscriber::util::SubscriberInitExt; use swap::{alice, bob};
use testcontainers::clients::Cli;
use tracing_subscriber::util::SubscriberInitExt;
#[tokio::test] #[tokio::test]
async fn swap() { async fn swap() {
let _guard = tracing_subscriber::fmt() let _guard = tracing_subscriber::fmt()
.with_env_filter( .with_env_filter(
"swap=debug,xmr_btc=debug,hyper=off,reqwest=off,monero_harness=info,testcontainers=info,libp2p=debug", "swap=debug,xmr_btc=debug,hyper=off,reqwest=off,monero_harness=info,testcontainers=info,libp2p=debug",
@ -94,4 +96,5 @@ async fn swap() {
assert!(xmr_alice_final.as_piconero() <= xmr_alice - xmr); assert!(xmr_alice_final.as_piconero() <= xmr_alice - xmr);
assert_eq!(xmr_bob_final.as_piconero(), xmr_bob + xmr); assert_eq!(xmr_bob_final.as_piconero(), xmr_bob + xmr);
}
} }