gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 01/02: harness: towards fixing the kyc integration t


From: gnunet
Subject: [taler-wallet-core] 01/02: harness: towards fixing the kyc integration test
Date: Mon, 13 Nov 2023 18:36:38 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

commit 58c16b2dd500a8999f3d3cd3f1236aabc8ddd2bf
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Nov 13 16:30:28 2023 +0100

    harness: towards fixing the kyc integration test
---
 packages/taler-harness/src/integrationtests/test-kyc.ts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts 
b/packages/taler-harness/src/integrationtests/test-kyc.ts
index 319e8828f..be6e704ee 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc.ts
@@ -26,6 +26,7 @@ import {
   TransactionMajorState,
   TransactionMinorState,
   TransactionType,
+  encodeCrock,
 } from "@gnu-taler/taler-util";
 import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
 import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
@@ -129,6 +130,7 @@ export async function createKycTestkudosEnvironment(
       "kyc_oauth2_info_url",
       "http://localhost:6666/oauth/v2/info";,
     );
+    config.setString(myprov, "kyc_oauth2_converter_helper", "/bin/cat");
     config.setString(myprov, "kyc_oauth2_client_id", "taler-exchange");
     config.setString(myprov, "kyc_oauth2_client_secret", "exchange-secret");
     config.setString(myprov, "kyc_oauth2_post_url", "https://taler.net";);
@@ -239,8 +241,13 @@ async function runTestfakeKycService(): 
Promise<TestfakeKycService> {
       if (!redirUriUnparsed) {
         throw Error("missing redirect_url");
       }
+      const state = qp.get("state");
+      if (!state) {
+        throw Error("missing state");
+      }
       const redirUri = new URL(redirUriUnparsed);
       redirUri.searchParams.set("code", "code_is_ok");
+      redirUri.searchParams.set("state", state);
       res.writeHead(200, { "Content-Type": "application/json" });
       res.end(
         JSON.stringify({
@@ -388,6 +395,11 @@ export async function runKycTest(t: GlobalTestState) {
   const proofHttpResp = await httpLib.fetch(kycProofUrl);
   logger.info(`proof resp status ${proofHttpResp.status}`);
   logger.info(`resp headers ${j2s(proofHttpResp.headers.toJSON())}`);
+  if (!(proofHttpResp.status >= 200 && proofHttpResp.status <= 299)) {
+    logger.error("kyc proof failed");
+    logger.info(await proofHttpResp.text());
+    t.assertTrue(false);
+  }
 
   // Now that KYC is done, withdrawal should finally succeed.
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]