Skip to content

Commit

Permalink
fix: itest kill script
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Oct 8, 2024
1 parent 24b637e commit baee4ea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/cdk-integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn create_backends_fake_wallet(
let ln_key = LnKey::new(CurrencyUnit::Sat, PaymentMethod::Bolt11);

let wallet = Arc::new(FakeWallet::new(
fee_reserve.clone(),
fee_reserve,
HashMap::default(),
HashSet::default(),
0,
Expand Down
4 changes: 2 additions & 2 deletions crates/cdk-mintd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ async fn main() -> anyhow::Result<()> {
.collect();

let nut_05_methods: Vec<MeltMethodSettings> = ln_backends
.iter()
.map(|(key, _ln)| MeltMethodSettings {
.keys()
.map(|key| MeltMethodSettings {
method: key.method,
unit: key.unit,
min_amount: Some(settings.ln.min_melt),
Expand Down
8 changes: 4 additions & 4 deletions crates/cdk-mintd/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl LnBackendSetup for config::Strike {

let strike = cdk_strike::Strike::new(
api_key.clone(),
unit.clone(),
unit,
Arc::new(Mutex::new(Some(receiver))),
webhook_url.to_string(),
)
Expand All @@ -117,12 +117,12 @@ impl LnBackendSetup for config::Strike {
.await?;
routers.push(router);

let ln_key = LnKey::new(unit.clone(), PaymentMethod::Bolt11);
let ln_key = LnKey::new(unit, PaymentMethod::Bolt11);

ln_backends.insert(ln_key, Arc::new(strike));

let input_fee_ppk = settings.info.input_fee_ppk.unwrap_or(0);
supported_units.insert(unit.clone(), (input_fee_ppk, 64));
supported_units.insert(unit, (input_fee_ppk, 64));
}

Ok(())
Expand Down Expand Up @@ -342,7 +342,7 @@ impl LnBackendSetup for config::FakeWallet {
let ln_key = LnKey::new(CurrencyUnit::Sat, PaymentMethod::Bolt12);

let wallet = Arc::new(cdk_fake_wallet::FakeWallet::new(
fee_reserve.clone(),
fee_reserve,
HashMap::default(),
HashSet::default(),
0,
Expand Down
8 changes: 4 additions & 4 deletions misc/itests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cleanup() {

# Kill the Rust binary process
echo "Killing the Rust binary with PID $RUST_BIN_PID"
# kill $CDK_ITEST_MINT_BIN_PID
kill $CDK_ITEST_MINT_BIN_PID

# Wait for the Rust binary to terminate
wait $CDK_ITEST_MINT_BIN_PID
Expand All @@ -15,11 +15,11 @@ cleanup() {

# Kill processes
lncli --lnddir="$cdk_itests/lnd" --network=regtest stop
# lightning-cli --regtest --lightning-dir="$cdk_itests/cln/" stop
# bitcoin-cli --datadir="$cdk_itests/bitcoin" -rpcuser=testuser -rpcpassword=testpass -rpcport=18443 stop
lightning-cli --regtest --lightning-dir="$cdk_itests/cln/" stop
bitcoin-cli --datadir="$cdk_itests/bitcoin" -rpcuser=testuser -rpcpassword=testpass -rpcport=18443 stop

# Remove the temporary directory
# rm -rf "$cdk_itests"
rm -rf "$cdk_itests"
echo "Temp directory removed: $cdk_itests"
unset cdk_itests
unset cdk_itests_mint_addr
Expand Down

0 comments on commit baee4ea

Please sign in to comment.