mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-02 10:35:22 -05:00
Prefix for wallet-rpc container name for concurrent tests
Past prefix cleanup removed too much. The container name needs prefix, but the wallet names within the container do not!
This commit is contained in:
parent
3fd77cbfb5
commit
ecebbb76b1
@ -68,13 +68,15 @@ impl<'c> Monero {
|
|||||||
|
|
||||||
let miner = "miner";
|
let miner = "miner";
|
||||||
tracing::info!("Starting miner wallet: {}", miner);
|
tracing::info!("Starting miner wallet: {}", miner);
|
||||||
let (miner_wallet, miner_container) = MoneroWalletRpc::new(cli, &miner, &monerod).await?;
|
let (miner_wallet, miner_container) =
|
||||||
|
MoneroWalletRpc::new(cli, &miner, &monerod, prefix.clone()).await?;
|
||||||
|
|
||||||
wallets.push(miner_wallet);
|
wallets.push(miner_wallet);
|
||||||
containers.push(miner_container);
|
containers.push(miner_container);
|
||||||
for wallet in additional_wallets.iter() {
|
for wallet in additional_wallets.iter() {
|
||||||
tracing::info!("Starting wallet: {}", wallet);
|
tracing::info!("Starting wallet: {}", wallet);
|
||||||
let (wallet, container) = MoneroWalletRpc::new(cli, &wallet, &monerod).await?;
|
let (wallet, container) =
|
||||||
|
MoneroWalletRpc::new(cli, &wallet, &monerod, prefix.clone()).await?;
|
||||||
wallets.push(wallet);
|
wallets.push(wallet);
|
||||||
containers.push(container);
|
containers.push(container);
|
||||||
}
|
}
|
||||||
@ -209,6 +211,7 @@ impl<'c> MoneroWalletRpc {
|
|||||||
cli: &'c Cli,
|
cli: &'c Cli,
|
||||||
name: &str,
|
name: &str,
|
||||||
monerod: &Monerod,
|
monerod: &Monerod,
|
||||||
|
prefix: String,
|
||||||
) -> Result<(Self, Container<'c, Cli, image::Monero>)> {
|
) -> Result<(Self, Container<'c, Cli, image::Monero>)> {
|
||||||
let wallet_rpc_port: u16 =
|
let wallet_rpc_port: u16 =
|
||||||
port_check::free_local_port().ok_or_else(|| anyhow!("Could not retrieve free port"))?;
|
port_check::free_local_port().ok_or_else(|| anyhow!("Could not retrieve free port"))?;
|
||||||
@ -218,7 +221,8 @@ impl<'c> MoneroWalletRpc {
|
|||||||
|
|
||||||
let network = monerod.network.clone();
|
let network = monerod.network.clone();
|
||||||
let run_args = RunArgs::default()
|
let run_args = RunArgs::default()
|
||||||
.with_name(name)
|
// prefix the container name so we can run multiple tests
|
||||||
|
.with_name(format!("{}{}", prefix, name))
|
||||||
.with_network(network.clone())
|
.with_network(network.clone())
|
||||||
.with_mapped_port(Port {
|
.with_mapped_port(Port {
|
||||||
local: wallet_rpc_port,
|
local: wallet_rpc_port,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user