diff options
Diffstat (limited to 'packages/taler-harness/src/harness/helpers.ts')
-rw-r--r-- | packages/taler-harness/src/harness/helpers.ts | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index 4c2ca80a7..ad77ce6ca 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -209,7 +209,7 @@ export async function createSimpleTestkudosEnvironmentV2( t: GlobalTestState, coinConfig: CoinConfig[] = defaultCoinConfig.map((x) => x("TESTKUDOS")), opts: EnvOptions = {}, -): Promise<SimpleTestEnvironment> { +): Promise<SimpleTestEnvironmentNg> { const db = await setupDb(t); const bank = await BankService.create(t, { @@ -293,15 +293,32 @@ export async function createSimpleTestkudosEnvironmentV2( ), }); - console.log("setup done!"); + const walletService = new WalletService(t, { + name: "wallet", + useInMemoryDb: true, + }); + await walletService.start(); + await walletService.pingUntilAvailable(); - const wallet = new WalletCli(t); + const walletClient = new WalletClient({ + unixPath: walletService.socketPath, + onNotification(n) { + console.log("got notification", n); + }, + }); + await walletClient.connect(); + await walletClient.client.call(WalletApiOperation.InitWallet, { + skipDefaults: true, + }); + + console.log("setup done!"); return { commonDb: db, exchange, merchant, - wallet, + walletClient, + walletService, bank, exchangeBankAccount, }; |