aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/harness/helpers.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-13 13:15:47 +0100
committerFlorian Dold <florian@dold.me>2023-02-13 13:15:47 +0100
commit22cb8adaa6d9584ad7638b9019b6d0c3eb7158bf (patch)
tree53544a96cca4bafd9b284f53a960585e20d74d0c /packages/taler-harness/src/harness/helpers.ts
parent79b77a0c3c5a9a07d22c276a63ed81eb30507eba (diff)
wallet-core,harness: introduce reserveIsReady flag, test tx lifeycle
Diffstat (limited to 'packages/taler-harness/src/harness/helpers.ts')
-rw-r--r--packages/taler-harness/src/harness/helpers.ts25
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,
};