aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-kyc.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-15 23:32:42 +0100
committerFlorian Dold <florian@dold.me>2023-02-16 02:50:29 +0100
commit825d2c4352022e7397854b2bd9ba7d3589873c07 (patch)
treed23530bf8408367439e6b3820ea0c4269bfeb39a /packages/taler-harness/src/integrationtests/test-kyc.ts
parentcb2f4c21d85707abb0221cbf2a859a98836b2d44 (diff)
downloadwallet-core-825d2c4352022e7397854b2bd9ba7d3589873c07.tar.xz
make wallet-cli runnable under qtart
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-kyc.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-kyc.ts14
1 files changed, 9 insertions, 5 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts b/packages/taler-harness/src/integrationtests/test-kyc.ts
index 490673cee..915c3d470 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc.ts
@@ -17,11 +17,14 @@
/**
* Imports.
*/
-import { Duration, j2s, NotificationType } from "@gnu-taler/taler-util";
+import {
+ Duration,
+ j2s,
+ NotificationType,
+} from "@gnu-taler/taler-util";
import {
BankAccessApi,
BankApi,
- NodeHttpLib,
WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
@@ -37,6 +40,7 @@ import {
} from "../harness/harness.js";
import { EnvOptions, SimpleTestEnvironmentNg } from "../harness/helpers.js";
import * as http from "node:http";
+import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
export async function createKycTestkudosEnvironment(
t: GlobalTestState,
@@ -336,12 +340,12 @@ export async function runKycTest(t: GlobalTestState) {
// We now simulate the user interacting with the KYC service,
// which would usually done in the browser.
- const httpClient = new NodeHttpLib();
- const kycServerResp = await httpClient.get(kycNotif.kycUrl);
+ const httpLib = createPlatformHttpLib();
+ const kycServerResp = await httpLib.get(kycNotif.kycUrl);
const kycLoginResp = await kycServerResp.json();
console.log("kyc server resp:", j2s(kycLoginResp));
const kycProofUrl = kycLoginResp.redirect_uri;
- const proofHttpResp = await httpClient.get(kycProofUrl);
+ const proofHttpResp = await httpLib.get(kycProofUrl);
console.log("proof resp status", proofHttpResp.status);
console.log("resp headers", proofHttpResp.headers.toJSON());