[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: harness: fix payment-claim te
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: harness: fix payment-claim test |
Date: |
Mon, 08 Jan 2024 11:40:52 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 06fb3a5c9 harness: fix payment-claim test
06fb3a5c9 is described below
commit 06fb3a5c910b5be37fbd386a5e42588903bece9b
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Jan 8 11:40:50 2024 +0100
harness: fix payment-claim test
---
.../src/integrationtests/test-payment-claim.ts | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/packages/taler-harness/src/integrationtests/test-payment-claim.ts
b/packages/taler-harness/src/integrationtests/test-payment-claim.ts
index b5ed89ec3..3595a1750 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-claim.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-claim.ts
@@ -23,14 +23,15 @@ import {
TalerErrorCode,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { GlobalTestState, WalletCli } from "../harness/harness.js";
+import { GlobalTestState } from "../harness/harness.js";
import {
createSimpleTestkudosEnvironmentV2,
+ createWalletDaemonWithClient,
withdrawViaBankV2,
} from "../harness/helpers.js";
/**
- * Run test for basic, bank-integrated withdrawal.
+ * Run test where a wallet tries to claim an already claimed order.
*/
export async function runPaymentClaimTest(t: GlobalTestState) {
// Set up test environment
@@ -40,7 +41,7 @@ export async function runPaymentClaimTest(t: GlobalTestState)
{
const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
- const walletTwo = new WalletCli(t, "two");
+ const w2 = await createWalletDaemonWithClient(t, { name: "w2" });
// Withdraw digital cash into the wallet.
@@ -84,14 +85,16 @@ export async function runPaymentClaimTest(t:
GlobalTestState) {
preparePayResult.status === PreparePayResultType.PaymentPossible,
);
- t.assertThrowsTalerErrorAsync(async () => {
- await walletTwo.client.call(WalletApiOperation.PreparePayForUri, {
+ const errOne = t.assertThrowsTalerErrorAsync(async () => {
+ await w2.walletClient.call(WalletApiOperation.PreparePayForUri, {
talerPayUri,
});
});
+ console.log(errOne);
+
await walletClient.call(WalletApiOperation.ConfirmPay, {
- proposalId: preparePayResult.proposalId,
+ transactionId: preparePayResult.transactionId,
});
// Check if payment was successful.
@@ -102,10 +105,10 @@ export async function runPaymentClaimTest(t:
GlobalTestState) {
t.assertTrue(orderStatus.order_status === "paid");
- walletTwo.deleteDatabase();
+ await w2.walletClient.call(WalletApiOperation.ClearDb, {});
const err = await t.assertThrowsTalerErrorAsync(async () => {
- await walletTwo.client.call(WalletApiOperation.PreparePayForUri, {
+ await w2.walletClient.call(WalletApiOperation.PreparePayForUri, {
talerPayUri,
});
});
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: harness: fix payment-claim test,
gnunet <=