commit 99a74c19f53d5e03d52db2eaf170edb0475ddd48 parent 5b580579837ff6a9af91968b08e38d23f98e8de8 Author: Florian Dold <florian@dold.me> Date: Wed, 25 Feb 2026 15:58:22 +0100 harness: simplify exchange-merchant-kyc-auth test Diffstat:
36 files changed, 207 insertions(+), 78 deletions(-)
diff --git a/packages/taler-harness/src/harness/environments.ts b/packages/taler-harness/src/harness/environments.ts @@ -95,13 +95,7 @@ import { } from "./harness.js"; import * as fs from "node:fs"; -import { - By, - Builder, - Browser, - chromium, - ThenableWebDriver, -} from "selenium-webdriver"; +import { Browser, Builder, ThenableWebDriver } from "selenium-webdriver"; import * as Chrome from "selenium-webdriver/chrome.js"; import * as Firefox from "selenium-webdriver/firefox.js"; @@ -1213,7 +1207,7 @@ export interface KycTestEnv { bank: BankServiceHandle; } -export async function createKycTestkudosEnvironment( +export async function createKycTestkudosEnvironmentFull( t: GlobalTestState, opts: KycEnvOptions = {}, ): Promise<KycTestEnv> { @@ -1408,6 +1402,141 @@ export async function createKycTestkudosEnvironment( }; } +export interface MinimalKycTestEnv { + commonDb: DbInfo; + bankClient: TalerCorebankApiClient; + exchange: ExchangeService; + exchangeBankAccount: HarnessExchangeBankAccount; + amlKeypair: EddsaKeyPairStrings; + exchangeApi: TalerExchangeHttpClient; + wireGatewayApi: TalerWireGatewayHttpClient; + bank: BankServiceHandle; +} + +export async function createKycTestkudosEnvironment( + t: GlobalTestState, + opts: KycEnvOptions = {}, +): Promise<MinimalKycTestEnv> { + const db = await setupDb(t); + + let coinConfig: CoinConfig[]; + if (opts.coinConfig) { + coinConfig = opts.coinConfig; + } else { + coinConfig = defaultCoinConfig.map((x) => x("TESTKUDOS")); + } + + const bank = await BankService.create(t, { + allowRegistrations: true, + currency: "TESTKUDOS", + database: db.connStr, + httpPort: 8082, + }); + + const exchange = ExchangeService.create(t, { + name: "testexchange-1", + currency: "TESTKUDOS", + httpPort: 8081, + database: db.connStr, + }); + + let receiverName = "Exchange"; + let exchangeBankUsername = "exchange"; + let exchangeBankPassword = "mypw-password"; + let exchangePaytoUri = getTestHarnessPaytoForLabel(exchangeBankUsername); + + const wireGatewayApiBaseUrl = new URL( + `accounts/${exchangeBankUsername}/taler-wire-gateway/`, + bank.corebankApiBaseUrl, + ).href; + + await exchange.addBankAccount("1", { + wireGatewayAuth: { + username: exchangeBankUsername, + password: exchangeBankPassword, + }, + wireGatewayApiBaseUrl, + accountPaytoUri: exchangePaytoUri, + }); + + bank.setSuggestedExchange(exchange, exchangePaytoUri); + + await bank.start(); + + await bank.pingUntilAvailable(); + + const bankClient = new TalerCorebankApiClient(bank.corebankApiBaseUrl, { + auth: { + username: "admin", + password: "admin-password", + }, + }); + + await bankClient.registerAccountExtended({ + name: receiverName, + password: exchangeBankPassword, + username: exchangeBankUsername, + is_taler_exchange: true, + payto_uri: exchangePaytoUri, + }); + + exchange.addCoinConfigList(coinConfig); + + const adjustExchangeConfig = opts.adjustExchangeConfig; + if (adjustExchangeConfig) { + await exchange.modifyConfig(async (config) => { + adjustExchangeConfig(config); + }); + } + + await exchange.start(); + + const cryptoApi = createSyncCryptoApi(); + const amlKeypair = await cryptoApi.createEddsaKeypair({}); + + await exchange.enableAmlAccount(amlKeypair.pub, "Alice"); + + const exchangeBankAccount: HarnessExchangeBankAccount = { + wireGatewayAuth: { + username: exchangeBankUsername, + password: exchangeBankPassword, + }, + accountPaytoUri: exchangePaytoUri, + wireGatewayApiBaseUrl, + }; + + t.logStep("env-setup-done"); + + const bankApi = new TalerCoreBankHttpClient( + bankClient.baseUrl, + harnessHttpLib, + ); + + const wireGatewayApi = new TalerWireGatewayHttpClient( + bankApi.getWireGatewayAPI( + exchangeBankAccount.wireGatewayAuth.username, + ).href, + { + httpClient: harnessHttpLib, + }, + ); + + const exchangeApi = new TalerExchangeHttpClient(exchange.baseUrl, { + httpClient: harnessHttpLib, + }); + + return { + commonDb: db, + exchange, + amlKeypair, + bankClient, + exchangeBankAccount, + wireGatewayApi, + exchangeApi, + bank, + }; +} + export interface TestUserResult { username: string; password: string; diff --git a/packages/taler-harness/src/integrationtests/test-exchange-kyc-auth.ts b/packages/taler-harness/src/integrationtests/test-exchange-kyc-auth.ts @@ -35,7 +35,7 @@ import { } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, withdrawViaBankV3, } from "../harness/environments.js"; @@ -108,7 +108,7 @@ export async function runExchangeKycAuthTest(t: GlobalTestState) { exchangeBankAccount, exchangeApi, bank, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); const merchantPayto = getTestHarnessPaytoForLabel("merchant-default"); diff --git a/packages/taler-harness/src/integrationtests/test-exchange-merchant-kyc-auth.ts b/packages/taler-harness/src/integrationtests/test-exchange-merchant-kyc-auth.ts @@ -29,7 +29,7 @@ import { import { createSyncCryptoApi } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, } from "../harness/environments.js"; import { getTestHarnessPaytoForLabel, @@ -92,7 +92,7 @@ export async function runExchangeMerchantKycAuthTest(t: GlobalTestState) { exchangeBankAccount, exchangeApi, bank, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); const merchantPayto = getTestHarnessPaytoForLabel("merchant-default"); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-amp-failure.ts b/packages/taler-harness/src/integrationtests/test-kyc-amp-failure.ts @@ -27,7 +27,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, withdrawViaBankV3, } from "../harness/environments.js"; @@ -73,7 +73,7 @@ export async function runKycAmpFailureTest(t: GlobalTestState) { // FIXME: Reduced test environment without merchant suffices const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); const wres = await withdrawViaBankV3(t, { walletClient, diff --git a/packages/taler-harness/src/integrationtests/test-kyc-amp-timeout.ts b/packages/taler-harness/src/integrationtests/test-kyc-amp-timeout.ts @@ -27,7 +27,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, withdrawViaBankV3, } from "../harness/environments.js"; @@ -71,7 +71,7 @@ export async function runKycAmpTimeoutTest(t: GlobalTestState) { // FIXME: Reduced test environment without merchant suffices const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); const wres = await withdrawViaBankV3(t, { walletClient, diff --git a/packages/taler-harness/src/integrationtests/test-kyc-balance-withdrawal-change-manual.ts b/packages/taler-harness/src/integrationtests/test-kyc-balance-withdrawal-change-manual.ts @@ -26,7 +26,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, } from "../harness/environments.js"; import { GlobalTestState } from "../harness/harness.js"; @@ -56,7 +56,7 @@ export async function runKycBalanceWithdrawalChangeManualTest( // Set up test environment const { walletClient, bankClient, exchange, exchangeBankAccount, bank } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-balance-withdrawal.ts b/packages/taler-harness/src/integrationtests/test-kyc-balance-withdrawal.ts @@ -34,7 +34,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, withdrawViaBankV3, } from "../harness/environments.js"; @@ -78,7 +78,7 @@ export async function runKycBalanceWithdrawalTest(t: GlobalTestState) { amlKeypair, exchangeBankAccount, bank, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-challenger.ts b/packages/taler-harness/src/integrationtests/test-kyc-challenger.ts @@ -31,7 +31,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import * as http from "node:http"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, } from "../harness/environments.js"; import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; @@ -133,7 +133,7 @@ export async function runKycChallengerTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, merchant } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig(config) { config.setString("exchange", "enable_kyc", "yes"); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-decision-attr.ts b/packages/taler-harness/src/integrationtests/test-kyc-decision-attr.ts @@ -33,7 +33,7 @@ import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { createSyncCryptoApi } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, } from "../harness/environments.js"; import { @@ -69,7 +69,7 @@ export async function runKycDecisionAttrTest(t: GlobalTestState) { exchange, amlKeypair, exchangeBankAccount, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); const merchantPayto = getTestHarnessPaytoForLabel("merchant-default"); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-decision-events.ts b/packages/taler-harness/src/integrationtests/test-kyc-decision-events.ts @@ -32,7 +32,7 @@ import { import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, } from "../harness/environments.js"; import { @@ -62,7 +62,7 @@ export async function runKycDecisionEventsTest(t: GlobalTestState) { // Set up test environment // FIXME: Reduced test environment without merchant suffices - const { exchange, amlKeypair } = await createKycTestkudosEnvironment(t, { + const { exchange, amlKeypair } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-decisions.ts b/packages/taler-harness/src/integrationtests/test-kyc-decisions.ts @@ -42,7 +42,7 @@ import { } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, withdrawViaBankV3, } from "../harness/environments.js"; @@ -81,7 +81,7 @@ export async function runKycDecisionsTest(t: GlobalTestState) { exchange, amlKeypair, exchangeBankAccount, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); const merchantPayto = getTestHarnessPaytoForLabel("merchant-default"); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-deposit-aggregate-implicit-auth.ts b/packages/taler-harness/src/integrationtests/test-kyc-deposit-aggregate-implicit-auth.ts @@ -25,7 +25,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, withdrawViaBankV3, } from "../harness/environments.js"; @@ -57,7 +57,7 @@ export async function runKycDepositAggregateImplicitAuthTest( // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-deposit-aggregate.ts b/packages/taler-harness/src/integrationtests/test-kyc-deposit-aggregate.ts @@ -27,7 +27,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, withdrawViaBankV3, } from "../harness/environments.js"; @@ -63,7 +63,7 @@ export async function runKycDepositAggregateTest(t: GlobalTestState) { bank, wireGatewayApi, amlKeypair, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-deposit-deposit-kyctransfer.ts b/packages/taler-harness/src/integrationtests/test-kyc-deposit-deposit-kyctransfer.ts @@ -29,7 +29,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, withdrawViaBankV3, } from "../harness/environments.js"; @@ -70,7 +70,7 @@ export async function runKycDepositDepositKyctransferTest(t: GlobalTestState) { amlKeypair, bank, wireGatewayApi, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-deposit-deposit.ts b/packages/taler-harness/src/integrationtests/test-kyc-deposit-deposit.ts @@ -26,7 +26,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, withdrawViaBankV3, } from "../harness/environments.js"; @@ -58,7 +58,7 @@ export async function runKycDepositDepositTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // Withdraw digital cash into the wallet. diff --git a/packages/taler-harness/src/integrationtests/test-kyc-deposit-kycauth.ts b/packages/taler-harness/src/integrationtests/test-kyc-deposit-kycauth.ts @@ -12,7 +12,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, createWalletDaemonWithClient, postAmlDecisionNoRules, withdrawViaBankV3, @@ -53,7 +53,7 @@ export async function runKycDepositKycauthTest(t: GlobalTestState) { bank, exchangeBankAccount, amlKeypair, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // wallet that will receive p2p transfer and do kyc + deposit const w1 = await createWalletDaemonWithClient(t, { diff --git a/packages/taler-harness/src/integrationtests/test-kyc-exchange-wallet.ts b/packages/taler-harness/src/integrationtests/test-kyc-exchange-wallet.ts @@ -26,7 +26,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, } from "../harness/environments.js"; import { GlobalTestState } from "../harness/harness.js"; @@ -35,7 +35,7 @@ export async function runKycExchangeWalletTest(t: GlobalTestState) { // Set up test environment const { walletClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig(config) { configureCommonKyc(config); 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 @@ -39,7 +39,7 @@ import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { execSync } from "node:child_process"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, } from "../harness/environments.js"; import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; @@ -123,7 +123,7 @@ function adjustExchangeConfig(config: Configuration) { export async function runKycFailRecoverSimpleTest(t: GlobalTestState) { // Set up test environment - const { exchange, amlKeypair } = await createKycTestkudosEnvironment(t, { + const { exchange, amlKeypair } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, onWalletNotification: () => {}, }); 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 @@ -29,7 +29,7 @@ import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, withdrawViaBankV3, } from "../harness/environments.js"; import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; @@ -84,7 +84,7 @@ export async function runKycFormBadMeasureTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // Withdraw digital cash into the wallet. diff --git a/packages/taler-harness/src/integrationtests/test-kyc-form-compression.ts b/packages/taler-harness/src/integrationtests/test-kyc-form-compression.ts @@ -33,7 +33,7 @@ import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, withdrawViaBankV3, } from "../harness/environments.js"; import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; @@ -88,7 +88,7 @@ export async function runKycFormCompressionTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // Withdraw digital cash into the wallet. diff --git a/packages/taler-harness/src/integrationtests/test-kyc-form-withdrawal.ts b/packages/taler-harness/src/integrationtests/test-kyc-form-withdrawal.ts @@ -33,7 +33,7 @@ import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, withdrawViaBankV3, } from "../harness/environments.js"; import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; @@ -88,7 +88,7 @@ export async function runKycFormWithdrawalTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // Withdraw digital cash into the wallet. diff --git a/packages/taler-harness/src/integrationtests/test-kyc-merchant-activate-bank-account.ts b/packages/taler-harness/src/integrationtests/test-kyc-merchant-activate-bank-account.ts @@ -28,7 +28,7 @@ import { succeedOrThrow, } from "@gnu-taler/taler-util"; import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; -import { createKycTestkudosEnvironment } from "../harness/environments.js"; +import { createKycTestkudosEnvironmentFull } from "../harness/environments.js"; import { delayMs, GlobalTestState, @@ -47,7 +47,7 @@ export async function runKycMerchantActivateBankAccountTest( bank, wireGatewayApi, merchantAdminAccessToken, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig(config) { config.setString("exchange", "enable_kyc", "yes"); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-merchant-aggregate.ts b/packages/taler-harness/src/integrationtests/test-kyc-merchant-aggregate.ts @@ -20,7 +20,7 @@ import { Configuration, j2s } from "@gnu-taler/taler-util"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, makeTestPaymentV2, withdrawViaBankV3, } from "../harness/environments.js"; @@ -60,7 +60,7 @@ export async function runKycMerchantAggregateTest(t: GlobalTestState) { exchange, bank, exchangeBankAccount, merchantAdminAccessToken, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // Withdraw digital cash into the wallet. diff --git a/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit-form.ts b/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit-form.ts @@ -35,7 +35,7 @@ import { } from "@gnu-taler/taler-util/http"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, } from "../harness/environments.js"; import { delayMs, @@ -103,7 +103,7 @@ export async function runKycMerchantDepositFormTest(t: GlobalTestState) { bank, wireGatewayApi, merchantAdminAccessToken, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit-rewrite.ts b/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit-rewrite.ts @@ -31,7 +31,7 @@ import { } from "@gnu-taler/taler-util"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, } from "../harness/environments.js"; import { delayMs, GlobalTestState } from "../harness/harness.js"; @@ -113,7 +113,7 @@ export async function runKycMerchantDepositRewriteTest(t: GlobalTestState) { merchant, merchantAdminAccessToken, exchangeApi, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, adjustMerchantConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts b/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts @@ -37,7 +37,7 @@ import { } from "@gnu-taler/taler-util/http"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, } from "../harness/environments.js"; import { @@ -88,7 +88,7 @@ export async function runKycMerchantDepositTest(t: GlobalTestState) { bank, amlKeypair, wireGatewayApi, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-new-measure.ts b/packages/taler-harness/src/integrationtests/test-kyc-new-measure.ts @@ -33,7 +33,7 @@ import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, withdrawViaBankV3, } from "../harness/environments.js"; @@ -46,7 +46,7 @@ export async function runKycNewMeasureTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig(config) { configureCommonKyc(config); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-new-measures-prog.ts b/packages/taler-harness/src/integrationtests/test-kyc-new-measures-prog.ts @@ -36,7 +36,7 @@ import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, withdrawViaBankV3, } from "../harness/environments.js"; @@ -155,7 +155,7 @@ export async function runKycNewMeasuresProgTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // Withdraw digital cash into the wallet. let kycPaytoHash: string | undefined; diff --git a/packages/taler-harness/src/integrationtests/test-kyc-peer-pull.ts b/packages/taler-harness/src/integrationtests/test-kyc-peer-pull.ts @@ -30,7 +30,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, createWalletDaemonWithClient, postAmlDecisionNoRules, withdrawViaBankV3, @@ -41,7 +41,7 @@ export async function runKycPeerPullTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig(config) { configureCommonKyc(config); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-peer-push.ts b/packages/taler-harness/src/integrationtests/test-kyc-peer-push.ts @@ -29,7 +29,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, createWalletDaemonWithClient, postAmlDecisionNoRules, withdrawViaBankV3, @@ -40,7 +40,7 @@ export async function runKycPeerPushTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig(config) { configureCommonKyc(config); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-skip-expiration.ts b/packages/taler-harness/src/integrationtests/test-kyc-skip-expiration.ts @@ -36,7 +36,7 @@ import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, withdrawViaBankV3, } from "../harness/environments.js"; @@ -143,7 +143,7 @@ export async function runKycSkipExpirationTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); // Withdraw digital cash into the wallet. let kycPaytoHash: string | undefined; diff --git a/packages/taler-harness/src/integrationtests/test-kyc-threshold-withdrawal.ts b/packages/taler-harness/src/integrationtests/test-kyc-threshold-withdrawal.ts @@ -27,7 +27,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecisionNoRules, } from "../harness/environments.js"; import { GlobalTestState } from "../harness/harness.js"; @@ -64,7 +64,7 @@ export async function runKycThresholdWithdrawalTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-two-forms.ts b/packages/taler-harness/src/integrationtests/test-kyc-two-forms.ts @@ -38,7 +38,7 @@ import { import { readResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, } from "../harness/environments.js"; import { GlobalTestState, harnessHttpLib, waitMs } from "../harness/harness.js"; @@ -145,7 +145,7 @@ function adjustExchangeConfig(config: Configuration) { export async function runKycTwoFormsTest(t: GlobalTestState) { // Set up test environment - const { exchange, amlKeypair } = await createKycTestkudosEnvironment(t, { + const { exchange, amlKeypair } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, onWalletNotification: () => {}, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-wallet-deposit-abort.ts b/packages/taler-harness/src/integrationtests/test-kyc-wallet-deposit-abort.ts @@ -27,7 +27,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, withdrawViaBankV3, } from "../harness/environments.js"; import { GlobalTestState } from "../harness/harness.js"; @@ -92,7 +92,7 @@ export async function runKycWalletDepositAbortTest(t: GlobalTestState) { exchangeBankAccount, wireGatewayApi, walletClient, - } = await createKycTestkudosEnvironment(t, { + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc-withdrawal-verboten.ts b/packages/taler-harness/src/integrationtests/test-kyc-withdrawal-verboten.ts @@ -29,7 +29,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, postAmlDecision, postAmlDecisionNoRules, } from "../harness/environments.js"; @@ -39,7 +39,7 @@ export async function runKycWithdrawalVerbotenTest(t: GlobalTestState) { // Set up test environment const { walletClient, bankClient, exchange, amlKeypair } = - await createKycTestkudosEnvironment(t, { + await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig(config) { configureCommonKyc(config); diff --git a/packages/taler-harness/src/integrationtests/test-merchant-kyc-auth-multi.ts b/packages/taler-harness/src/integrationtests/test-merchant-kyc-auth-multi.ts @@ -33,7 +33,7 @@ import { } from "@gnu-taler/taler-util"; import { configureCommonKyc, - createKycTestkudosEnvironment, + createKycTestkudosEnvironmentFull, } from "../harness/environments.js"; import { BankService, @@ -184,7 +184,7 @@ export async function runMerchantKycAuthMultiTest(t: GlobalTestState) { exchange, merchantAdminAccessToken, wireGatewayApi, - } = await createKycTestkudosEnvironment(t, { adjustExchangeConfig }); + } = await createKycTestkudosEnvironmentFull(t, { adjustExchangeConfig }); { const merchantInstId = "minst1";