commit 8358e74fad80fb36e2e78b7f45d018dcc3bcdc09 parent 12ab9751f74d65012a49407f291e5581a09007ed Author: Florian Dold <florian@dold.me> Date: Wed, 17 Dec 2025 19:48:13 +0100 harness: fix various test failures (due to mandatory FORM_ID) Diffstat:
5 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/packages/taler-harness/src/integrationtests/test-kyc-decision-events.ts b/packages/taler-harness/src/integrationtests/test-kyc-decision-events.ts @@ -30,7 +30,6 @@ import { TalerProtocolTimestamp, } from "@gnu-taler/taler-util"; import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; -import { createSyncCryptoApi } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, createKycTestkudosEnvironment, @@ -63,18 +62,12 @@ export async function runKycDecisionEventsTest(t: GlobalTestState) { // Set up test environment // FIXME: Reduced test environment without merchant suffices - const { - walletClient, - bankClient, - exchange, - amlKeypair, - exchangeBankAccount, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + const { exchange, amlKeypair } = await createKycTestkudosEnvironment(t, { + adjustExchangeConfig, + }); const merchantPayto = getTestHarnessPaytoForLabel("merchant-default"); - const cryptoApi = createSyncCryptoApi(); - const kycPaytoHash = encodeCrock(hashNormalizedPaytoUri(merchantPayto)); await postAmlDecision(t, { @@ -83,7 +76,7 @@ export async function runKycDecisionEventsTest(t: GlobalTestState) { exchangeBaseUrl: exchange.baseUrl, paytoHash: kycPaytoHash, paytoUri: merchantPayto, - attributes: { foo: 42 }, + attributes: { FORM_ID: "test", foo: 42 }, attributes_expiration: TalerProtocolTimestamp.never(), events: ["bla", "spam", "eggs"], newRules: { diff --git a/packages/taler-harness/src/integrationtests/test-kyc-fail-recover-simple.ts b/packages/taler-harness/src/integrationtests/test-kyc-fail-recover-simple.ts @@ -214,7 +214,7 @@ export async function runKycFailRecoverSimpleTest(t: GlobalTestState) { headers: { "Content-Type": "application/json", }, - body: { NAME: "child-fail" }, + body: { FORM_ID: "test", NAME: "child-fail" }, }, ); @@ -230,7 +230,7 @@ export async function runKycFailRecoverSimpleTest(t: GlobalTestState) { headers: { "Content-Type": "application/json", }, - body: { NAME: "just-kidding" }, + body: { FORM_ID: "test", NAME: "just-kidding" }, }, ); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-form-bad-measure.ts b/packages/taler-harness/src/integrationtests/test-kyc-form-bad-measure.ts @@ -136,6 +136,7 @@ export async function runKycFormBadMeasureTest(t: GlobalTestState) { "Content-Type": "application/json", }, body: { + FORM_ID: "test", full_name: "Alice Abc", birthdate: "2000-01-01", }, diff --git a/packages/taler-harness/src/integrationtests/test-kyc-two-forms.ts b/packages/taler-harness/src/integrationtests/test-kyc-two-forms.ts @@ -36,7 +36,10 @@ import { WalletKycRequest, } from "@gnu-taler/taler-util"; import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; -import { configureCommonKyc, createKycTestkudosEnvironment } from "../harness/environments.js"; +import { + configureCommonKyc, + createKycTestkudosEnvironment, +} from "../harness/environments.js"; import { GlobalTestState, harnessHttpLib, waitMs } from "../harness/harness.js"; const logger = new Logger("test-kyc-two-forms.ts"); @@ -234,7 +237,7 @@ export async function runKycTwoFormsTest(t: GlobalTestState) { headers: { "Content-Type": "application/json", }, - body: { NAME: "who" }, + body: { FORM_ID: "test", NAME: "who" }, }, ); diff --git a/packages/taler-harness/src/integrationtests/test-tops-peer.ts b/packages/taler-harness/src/integrationtests/test-tops-peer.ts @@ -185,13 +185,8 @@ export async function runTopsPeerTest(t: GlobalTestState) { console.log(j2s(infoResp2)); - if ( - !( - infoResp2.case === "ok" && - infoResp2.body.requirements[0].form === "accept-tos" - ) - ) { - t.fail("requirements need to include ToS (due to zero measure)"); + if (!(infoResp2.case === "ok" && infoResp2.body.requirements.length != 0)) { + t.fail("requirements may not include ToS after KYC for P2P"); } await walletClient.call(WalletApiOperation.TestingWaitTransactionState, {