mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-27 16:39:35 -05:00
77fc5743a2
Upgrade bitcoin harness dependency to latest commit Upgrade backoff to fix failing tests. The previous version of backoff had a broken version of the retry function. Upgraded to a newer comit which fixes this problem. Upgrade hyper to 0.14 as the 0.13 was bringing in tokio 0.2.24 Upgraded bitcoin harness to version that uses tokio 1.0 and reqwest 0.11 Upgrade reqwest to 0.11. Reqwest 0.11 uses tokio 1.0 Upgrade libp2p to 0.34 in preparation for tokio 1.0 upgrade
32 lines
910 B
Rust
32 lines
910 B
Rust
use crate::testutils::init_tracing;
|
|
use monero_harness::Monero;
|
|
use spectral::prelude::*;
|
|
use std::time::Duration;
|
|
use testcontainers::clients::Cli;
|
|
use tokio::time;
|
|
|
|
mod testutils;
|
|
|
|
#[tokio::test]
|
|
async fn init_miner_and_mine_to_miner_address() {
|
|
let _guard = init_tracing();
|
|
|
|
let tc = Cli::default();
|
|
let (monero, _monerod_container) = Monero::new(&tc, None, vec![]).await.unwrap();
|
|
|
|
monero.init(vec![]).await.unwrap();
|
|
|
|
let monerod = monero.monerod();
|
|
let miner_wallet = monero.wallet("miner").unwrap();
|
|
|
|
let got_miner_balance = miner_wallet.balance().await.unwrap();
|
|
assert_that!(got_miner_balance).is_greater_than(0);
|
|
|
|
time::sleep(Duration::from_millis(1010)).await;
|
|
|
|
// after a bit more than 1 sec another block should have been mined
|
|
let block_height = monerod.client().get_block_count().await.unwrap();
|
|
|
|
assert_that(&block_height).is_greater_than(70);
|
|
}
|