gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: harness: fix denom-unoffered


From: gnunet
Subject: [taler-wallet-core] branch master updated: harness: fix denom-unoffered test
Date: Mon, 13 Nov 2023 12:22:13 +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 d1acc3641 harness: fix denom-unoffered test
d1acc3641 is described below

commit d1acc36414d251d92b2669acfe7d62ff614caeec
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Nov 13 12:22:12 2023 +0100

    harness: fix denom-unoffered test
---
 .../src/integrationtests/test-denom-unoffered.ts   | 23 +++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git 
a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts 
b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
index b4268ee42..259cc33f9 100644
--- a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
+++ b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
@@ -100,16 +100,33 @@ export async function runDenomUnofferedTest(t: 
GlobalTestState) {
     transactionId: confirmResp.transactionId,
   });
 
+  t.assertTrue(tx.error != null);
   t.assertTrue(
-    tx.error?.code === TalerErrorCode.WALLET_UNEXPECTED_REQUEST_ERROR,
+    tx.error.code === TalerErrorCode.WALLET_PAY_MERCHANT_SERVER_ERROR,
   );
 
-  const merchantErrorCode = ((tx.error as any).errorResponse as any).code;
+  const merchantErrorCode = (tx.error as any).requestError.errorResponse.code;
+
   t.assertDeepEqual(
     merchantErrorCode,
-    TalerErrorCode.MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND,
+    TalerErrorCode.MERCHANT_GENERIC_EXCHANGE_UNEXPECTED_STATUS,
+  );
+
+  const exchangeErrorCode = (tx.error as any).requestError.errorResponse
+    .exchange_ec;
+
+  t.assertDeepEqual(
+    exchangeErrorCode,
+    TalerErrorCode.EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN,
   );
 
+  // Depending on whether the merchant has seen the new denominations or not,
+  // the error code might be different here.
+  // t.assertDeepEqual(
+  //   merchantErrorCode,
+  //   TalerErrorCode.MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND,
+  // );
+
   await walletClient.call(WalletApiOperation.AddExchange, {
     exchangeBaseUrl: exchange.baseUrl,
     forceUpdate: true,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]