From d1acc36414d251d92b2669acfe7d62ff614caeec Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 13 Nov 2023 12:22:12 +0100 Subject: harness: fix denom-unoffered test --- .../src/integrationtests/test-denom-unoffered.ts | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'packages/taler-harness/src/integrationtests/test-denom-unoffered.ts') 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, -- cgit v1.2.3