commit 1f0a2c64900099764bdb533412b02f355d05fdcc
parent 72391ed8f4b829b84ad6d5ba8c040ecbf5d35f02
Author: Florian Dold <florian@dold.me>
Date: Fri, 9 May 2025 17:40:43 +0200
harness: make tops-aml-measures pass under stronger validation in exchange
Diffstat:
2 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/packages/taler-harness/src/harness/tops.ts b/packages/taler-harness/src/harness/tops.ts
@@ -353,7 +353,7 @@ TYPE = FORM
FORM_NAME = vqf_902_9_customer
DESCRIPTION = "Supply VQF form 902.9"
DESCRIPTION_I18N = {"de":"Formular VQF 902.9 hochladen"}
-OUTPUTS = SUBMITTED_BY CONTRACTING_PARTY BENEFICIAL_OWNER_LIST
+OUTPUTS = IDENTITY_CONTRACTING_PARTNER IDENTITY_LIST
FALLBACK = preserve-investigate
[kyc-check-form-vqf-902.11]
@@ -361,7 +361,7 @@ TYPE = FORM
FORM_NAME = vqf_902_11_customer
DESCRIPTION = "Supply VQF form 902.11"
DESCRIPTION_I18N = {"de":"Formular VQF 902.11 hochladen"}
-OUTPUTS = SUBMITTED_BY CONTRACTING_PARTY CONTROL_REASON CONTROLLING_LIST THIRD_PARTY_OWNERSHIP
+OUTPUTS = IDENTITY_CONTRACTING_PARTNER CONTROL_REASON IDENTITY_LIST THIRD_PARTY_OWNERSHIP
FALLBACK = preserve-investigate
#[kyc-check-form-vqf-902.12]
@@ -500,6 +500,7 @@ DESCRIPTION = "Program that checks if the 'Controlling entity 3rd persion' check
COMMAND = taler-exchange-helper-measure-tops-3rdparty-check
ENABLED = YES
FALLBACK = freeze-investigate
+
`;
const topsProvidersTestConf = `
diff --git a/packages/taler-harness/src/integrationtests/test-tops-aml-measures.ts b/packages/taler-harness/src/integrationtests/test-tops-aml-measures.ts
@@ -91,17 +91,32 @@ export async function runTopsAmlMeasuresTest(t: GlobalTestState) {
DOMICILE_ADDRESS: "Castle St. 1\nWondertown",
});
await expectNoInvestigate();
- // Form is not validated yet
+
+ // Submit with missing attributes
+ await t.assertThrowsTalerErrorAsync(async () => {
+ await submitForm("vqf_902_11_customer", {
+ FORM_ID: "vqf_902_11_customer",
+ THIRD_PARTY_OWNERSHIP: true,
+ FORM_VERSION: 1,
+ });
+ });
+
+ // Form currently only undergoes very basic
+ // validation directly upon submission.
await submitForm("vqf_902_11_customer", {
FORM_ID: "vqf_902_11_customer",
- THIRD_PARTY_OWNERSHIP: true,
FORM_VERSION: 1,
+ THIRD_PARTY_OWNERSHIP: true,
+ IDENTITY_CONTRACTING_PARTNER: "foo",
+ CONTROL_REASON: "bla",
+ IDENTITY_LIST: [],
});
await expectNoInvestigate();
await submitForm("vqf_902_9_customer", {
- // Form is not validated yet
FORM_ID: "vqf_902_9_customer",
FORM_VERSION: 1,
+ IDENTITY_CONTRACTING_PARTNER: "foo",
+ IDENTITY_LIST: [],
});
await expectInvestigate();
}
@@ -191,24 +206,28 @@ export async function runTopsAmlMeasuresTest(t: GlobalTestState) {
{
await decideMeasure("form-vqf-902.9");
await submitForm("vqf_902_9_customer", {
- // Form is not validated yet
FORM_ID: "vqf_902_9_customer",
FORM_VERSION: 1,
+ IDENTITY_CONTRACTING_PARTNER: "foo",
+ IDENTITY_LIST: [],
});
}
{
await decideMeasure("form-vqf-902.11");
- // Form is not validated yet
await submitForm("vqf_902_11_customer", {
FORM_ID: "vqf_902_11_customer",
- THIRD_PARTY_OWNERSHIP: true,
FORM_VERSION: 1,
+ THIRD_PARTY_OWNERSHIP: true,
+ IDENTITY_CONTRACTING_PARTNER: "foo",
+ CONTROL_REASON: "bla",
+ IDENTITY_LIST: [],
});
await submitForm("vqf_902_9_customer", {
- // Form is not validated yet
FORM_ID: "vqf_902_9_customer",
FORM_VERSION: 1,
+ IDENTITY_CONTRACTING_PARTNER: "foo",
+ IDENTITY_LIST: [],
});
}
@@ -216,11 +235,13 @@ export async function runTopsAmlMeasuresTest(t: GlobalTestState) {
{
await decideMeasure("form-vqf-902.11");
- // Form is not validated yet
await submitForm("vqf_902_11_customer", {
FORM_ID: "vqf_902_11_customer",
- THIRD_PARTY_OWNERSHIP: false,
FORM_VERSION: 1,
+ THIRD_PARTY_OWNERSHIP: false,
+ IDENTITY_CONTRACTING_PARTNER: "foo",
+ CONTROL_REASON: "bla",
+ IDENTITY_LIST: [],
});
// No third party ownership => Waiting for AML officer
await expectInfo();