Add Bob restart test

This commit is contained in:
Daniel Karzel 2020-12-14 22:16:39 +11:00 committed by Franck Royer
parent 4ec2da29a0
commit 7cae6a9e4d
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
7 changed files with 139 additions and 410 deletions

View file

@ -2,8 +2,7 @@ use crate::testutils::{init_alice, init_bob};
use futures::future::try_join;
use libp2p::Multiaddr;
use rand::rngs::OsRng;
use swap::{alice, bob, storage::Database};
use tempfile::tempdir;
use swap::{alice, bob};
use testcontainers::clients::Cli;
use testutils::init_tracing;
use uuid::Uuid;
@ -49,6 +48,7 @@ async fn happy_path() {
alice_event_loop_handle,
alice_btc_wallet,
alice_xmr_wallet,
alice_db,
) = init_alice(
&bitcoind,
&monero,
@ -72,9 +72,6 @@ async fn happy_path() {
)
.await;
let alice_db_datadir = tempdir().unwrap();
let alice_db = Database::open(alice_db_datadir.path()).unwrap();
let alice_swap_fut = alice::swap::swap(
alice_state,
alice_event_loop_handle,