gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: adapt tests to do kycauth wire t


From: gnunet
Subject: [taler-exchange] branch master updated: adapt tests to do kycauth wire transfers that are now needed
Date: Tue, 01 Oct 2024 20:33:35 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new d331fd2d3 adapt tests to do kycauth wire transfers that are now needed
d331fd2d3 is described below

commit d331fd2d3604bf82abc5902527d93fde3a67e39d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Oct 1 20:33:32 2024 +0200

    adapt tests to do kycauth wire transfers that are now needed
---
 src/testing/test_exchange_api_revocation.c | 72 ++++++++++++++++++++++--------
 src/testing/test_exchange_api_twisted.c    | 19 ++++++++
 2 files changed, 72 insertions(+), 19 deletions(-)

diff --git a/src/testing/test_exchange_api_revocation.c 
b/src/testing/test_exchange_api_revocation.c
index 92e36a30a..2b707c968 100644
--- a/src/testing/test_exchange_api_revocation.c
+++ b/src/testing/test_exchange_api_revocation.c
@@ -47,6 +47,21 @@ static char *config_file;
 static struct TALER_TESTING_Credentials cred;
 
 
+/**
+ * Execute the taler-exchange-wirewatch command with
+ * our configuration file.
+ *
+ * @param label label to use for the command.
+ */
+static struct TALER_TESTING_Command
+CMD_EXEC_WIREWATCH (const char *label)
+{
+  return TALER_TESTING_cmd_exec_wirewatch2 (label,
+                                            config_file,
+                                            "exchange-account-2");
+}
+
+
 /**
  * Main function that will tell the interpreter what commands to
  * run.
@@ -86,9 +101,7 @@ run (void *cls,
     /**
      * Run wire-watch to trigger the reserve creation.
      */
-    TALER_TESTING_cmd_exec_wirewatch2 ("wirewatch-4",
-                                       config_file,
-                                       "exchange-account-2"),
+    CMD_EXEC_WIREWATCH ("wirewatch-4"),
     /* Withdraw a 5 EUR coin, at fee of 1 ct */
     TALER_TESTING_cmd_withdraw_amount ("withdraw-revocation-coin-1",
                                        "create-reserve-1",
@@ -103,23 +116,44 @@ run (void *cls,
                                        MHD_HTTP_OK),
     /* Try to partially spend (deposit) 1 EUR of the 5 EUR coin (in full)
      * (merchant would receive EUR:0.99 due to 1 ct deposit fee) *///
-    TALER_TESTING_cmd_deposit ("deposit-partial",
-                               "withdraw-revocation-coin-1",
-                               0,
-                               cred.user42_payto,
-                               "{\"items\":[{\"name\":\"ice 
cream\",\"value\":\"EUR:1\"}]}",
-                               GNUNET_TIME_UNIT_ZERO,
-                               "EUR:1",
-                               MHD_HTTP_OK),
+    TALER_TESTING_cmd_set_var (
+      "account-priv",
+      TALER_TESTING_cmd_deposit (
+        "deposit-partial-fail-kyc",
+        "withdraw-revocation-coin-1",
+        0,
+        cred.user42_payto,
+        "{\"items\":[{\"name\":\"ice cream\",\"value\":\"EUR:1\"}]}",
+        GNUNET_TIME_UNIT_ZERO,
+        "EUR:1",
+        MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS)),
+    TALER_TESTING_cmd_admin_add_kycauth (
+      "kyc-auth-transfer",
+      "EUR:0.01",
+      &cred.ba,
+      cred.user42_payto,
+      "deposit-partial-fail-kyc"),
+    CMD_EXEC_WIREWATCH (
+      "import-kyc-account-withdraw"),
+    TALER_TESTING_cmd_deposit (
+      "deposit-partial",
+      "withdraw-revocation-coin-1",
+      0,
+      cred.user42_payto,
+      "{\"items\":[{\"name\":\"ice cream\",\"value\":\"EUR:2\"}]}",
+      GNUNET_TIME_UNIT_ZERO,
+      "EUR:1",
+      MHD_HTTP_OK),
     /* Deposit another coin in full */
-    TALER_TESTING_cmd_deposit ("deposit-full",
-                               "withdraw-revocation-coin-2",
-                               0,
-                               cred.user42_payto,
-                               "{\"items\":[{\"name\":\"ice 
cream\",\"value\":\"EUR:5\"}]}",
-                               GNUNET_TIME_UNIT_ZERO,
-                               "EUR:5",
-                               MHD_HTTP_OK),
+    TALER_TESTING_cmd_deposit (
+      "deposit-full",
+      "withdraw-revocation-coin-2",
+      0,
+      cred.user42_payto,
+      "{\"items\":[{\"name\":\"ice cream\",\"value\":\"EUR:5\"}]}",
+      GNUNET_TIME_UNIT_ZERO,
+      "EUR:5",
+      MHD_HTTP_OK),
     /**
      * Melt SOME of the rest of the coin's value
      * (EUR:3.17 = 3x EUR:1.03 + 7x EUR:0.13)
diff --git a/src/testing/test_exchange_api_twisted.c 
b/src/testing/test_exchange_api_twisted.c
index 75ffe1f15..a31e7a4c3 100644
--- a/src/testing/test_exchange_api_twisted.c
+++ b/src/testing/test_exchange_api_twisted.c
@@ -124,6 +124,25 @@ run (void *cls,
       "EUR:5",
       0,                                  /* age restriction off */
       MHD_HTTP_OK),
+    TALER_TESTING_cmd_set_var (
+      "account-priv",
+      TALER_TESTING_cmd_deposit (
+        "refresh-deposit-partial-fail-kyc",
+        "refresh-withdraw-coin",
+        0,
+        cred.user42_payto,
+        "{\"items\":[{\"name\":\"ice cream\",\"value\":\"EUR:1\"}]}",
+        GNUNET_TIME_UNIT_ZERO,
+        "EUR:1",
+        MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS)),
+    TALER_TESTING_cmd_admin_add_kycauth (
+      "kyc-auth-transfer",
+      "EUR:0.01",
+      &cred.ba,
+      cred.user42_payto,
+      "refresh-deposit-partial-fail-kyc"),
+    CMD_EXEC_WIREWATCH (
+      "import-kyc-account-withdraw"),
     TALER_TESTING_cmd_deposit (
       "refresh-deposit-partial",
       "refresh-withdraw-coin",

-- 
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]