From cfaf3ce325d3f054093cee6d71b99726758669f6 Mon Sep 17 00:00:00 2001 From: DhananjayPurohit Date: Wed, 5 Jun 2024 13:39:39 +0530 Subject: [PATCH] fix: wallet names in tests --- clients/apps/nodejs/test_basic_workflow2.js | 29 ++++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/clients/apps/nodejs/test_basic_workflow2.js b/clients/apps/nodejs/test_basic_workflow2.js index ba9b1cde..10363394 100644 --- a/clients/apps/nodejs/test_basic_workflow2.js +++ b/clients/apps/nodejs/test_basic_workflow2.js @@ -8,7 +8,7 @@ const client_config = require('./client_config'); async function removeDatabase() { try { const clientConfig = client_config.load(); - const { stdout, stderr } = await exec(`rm ${clientConfig.databaseFile}`); + const { stdout, stderr } = await exec(`rm ./${clientConfig.databaseFile}`); console.log('stdout:', stdout); console.error('stderr:', stderr); } catch (e) { @@ -364,16 +364,19 @@ async function depositAndRepeatSend(clientConfig, wallet_1_name) { await removeDatabase(); // // Deposit, iterative self transfer - // await removeDatabase(); - // await createWallet(clientConfig, wallet_1_name); - // await walletTransfersToItselfTillLocktimeReachesBlockHeightAndWithdraw(clientConfig, wallet_1_name); - // await removeDatabase(); - - // // Deposit, repeat send - // await removeDatabase(); - // await createWallet(clientConfig, wallet_1_name); - // await createWallet(clientConfig, wallet_2_name); - // await depositAndRepeatSend(clientConfig, wallet_1_name); - // await walletTransfersToAnotherAndBroadcastsBackupTx(clientConfig, wallet_1_name, wallet_2_name); - // await removeDatabase(); + let wallet_3_name = "w3"; + await removeDatabase(); + await createWallet(clientConfig, wallet_3_name); + await walletTransfersToItselfTillLocktimeReachesBlockHeightAndWithdraw(clientConfig, wallet_3_name); + await removeDatabase(); + + // Deposit, repeat send + let wallet_4_name = "w4"; + let wallet_5_name = "w5"; + await removeDatabase(); + await createWallet(clientConfig, wallet_4_name); + await createWallet(clientConfig, wallet_5_name); + await depositAndRepeatSend(clientConfig, wallet_4_name); + await walletTransfersToAnotherAndBroadcastsBackupTx(clientConfig, wallet_4_name, wallet_5_name); + await removeDatabase(); })();