gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: fix FIXMEs in test_cmd_truth_up


From: gnunet
Subject: [taler-anastasis] branch master updated: fix FIXMEs in test_cmd_truth_upload, closes #6753
Date: Fri, 09 Apr 2021 20:10:59 +0200

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 0e24387  fix FIXMEs in test_cmd_truth_upload, closes #6753
0e24387 is described below

commit 0e243876b17b12856f50228b0b21bd41bd84f5bb
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Apr 9 20:10:57 2021 +0200

    fix FIXMEs in test_cmd_truth_upload, closes #6753
---
 src/testing/testing_cmd_truth_upload.c | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/src/testing/testing_cmd_truth_upload.c 
b/src/testing/testing_cmd_truth_upload.c
index d75c39c..f9149d5 100644
--- a/src/testing/testing_cmd_truth_upload.c
+++ b/src/testing/testing_cmd_truth_upload.c
@@ -131,15 +131,37 @@ truth_upload_cb (void *cls,
   struct TruthUploadState *tus = cls;
 
   tus->tuo = NULL;
-  if (NULL == t)
+  if (NULL == ud)
   {
-    // FIXME: handle payment!
-    // tus->payment_secret_response = XXX;
-
     GNUNET_break (0);
     TALER_TESTING_interpreter_fail (tus->is);
     return;
   }
+  if (ud->http_status != tus->http_status)
+  {
+    GNUNET_break (0);
+    TALER_TESTING_interpreter_fail (tus->is);
+    return;
+  }
+  if (MHD_HTTP_PAYMENT_REQUIRED == ud->http_status)
+  {
+    if (ANASTASIS_US_PAYMENT_REQUIRED != ud->us)
+    {
+      GNUNET_break (0);
+      TALER_TESTING_interpreter_fail (tus->is);
+      return;
+    }
+    tus->payment_secret_response = ud->details.payment.ps;
+    TALER_TESTING_interpreter_next (tus->is);
+    return;
+  }
+  if ( (ANASTASIS_US_SUCCESS == ud->us) &&
+       (NULL == t) )
+  {
+    GNUNET_break (0);
+    TALER_TESTING_interpreter_next (tus->is);
+    return;
+  }
   tus->truth = t;
   TALER_TESTING_interpreter_next (tus->is);
 }
@@ -221,7 +243,6 @@ static void
 truth_upload_cleanup (void *cls,
                       const struct TALER_TESTING_Command *cmd)
 {
-  // FIXME: Cleanup logic
   struct TruthUploadState *tus = cls;
 
   if (NULL != tus->tuo)

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