gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated (e152251 -> e3e3107)


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated (e152251 -> e3e3107)
Date: Mon, 02 Jul 2018 22:15:01 +0200

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

marcello pushed a change to branch master
in repository merchant.

    from e152251  Towards #5332
     new e04cb75  cut unused data off from track CMDs.
     new 428abf8  polishing tip CMD
     new e3e3107  kill FIXME

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/include/taler_merchant_service.h               |  5 +++++
 src/include/taler_merchant_testing_lib.h           |  9 ++------
 src/lib/test_merchant_api_new.c                    | 20 ++++++-----------
 src/lib/testing_api_cmd_tip.c                      | 25 ++++++++++++++++------
 src/lib/testing_api_cmd_track.c                    | 22 +++++--------------
 .../taler-merchant-generate-payments.c             |  7 ++----
 6 files changed, 39 insertions(+), 49 deletions(-)

diff --git a/src/include/taler_merchant_service.h 
b/src/include/taler_merchant_service.h
index 0f30aab..0a87b18 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -1005,6 +1005,11 @@ struct TALER_MERCHANT_TipQueryOperation;
  * @param http_status HTTP status code for this request
  * @param ec Taler-specific error code
  * @param raw raw response body
+ * @param reserve_expiration when the tip reserve will expire
+ * @param reserve_pub tip reserve public key
+ * @param amount_authorized total amount authorized on tip reserve
+ * @param amount_available total amount still available on tip reserve
+ * @param amount_picked_up total amount picked up from tip reserve
  */
 typedef void
 (*TALER_MERCHANT_TipQueryCallback) (void *cls,
diff --git a/src/include/taler_merchant_testing_lib.h 
b/src/include/taler_merchant_testing_lib.h
index 3011678..dface43 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -342,9 +342,7 @@ TALER_TESTING_cmd_history (const char *label,
  *        /track/transaction request.
  * @param ctx CURL context.
  * @param http_status expected HTTP response code.
- * @param transfer_reference FIXME not used.
  * @param pay_reference used to retrieve the order id to track.
- * @param wire_fee FIXME not used.
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_merchant_track_transaction
@@ -352,9 +350,7 @@ TALER_TESTING_cmd_merchant_track_transaction
    const char *merchant_url,
    struct GNUNET_CURL_Context *ctx,
    unsigned int http_status,
-   const char *transfer_reference,
-   const char *pay_reference,
-   const char *wire_fee);
+   const char *pay_reference);
 
 /**
  * Define a "track transfer" CMD.
@@ -375,8 +371,7 @@ TALER_TESTING_cmd_merchant_track_transfer
    const char *merchant_url,
    struct GNUNET_CURL_Context *ctx,
    unsigned int http_status,
-   const char *check_bank_reference,
-   const char *pay_reference);
+   const char *check_bank_reference);
 
 /* ****** Specific traits supported by this component ******* */
 
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
index 17fcd5b..b11caca 100644
--- a/src/lib/test_merchant_api_new.c
+++ b/src/lib/test_merchant_api_new.c
@@ -342,25 +342,21 @@ run (void *cls,
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "check_bank_transfer-498c",
-       "deposit-simple",
-       "EUR:0.01"),
+       "deposit-simple"),
 
     TALER_TESTING_cmd_merchant_track_transfer
       ("track-transfer-1",
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "check_bank_transfer-498c",
-       "deposit-simple"),
+       "check_bank_transfer-498c"),
 
     TALER_TESTING_cmd_merchant_track_transfer
       ("track-transfer-again",
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "check_bank_transfer-498c",
-       "deposit-simple"),
+       "check_bank_transfer-498c"),
 
     TALER_TESTING_cmd_fakebank_transfer
       ("create-reserve-2",
@@ -429,25 +425,21 @@ run (void *cls,
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "check_bank_transfer-498c-2",
-       "deposit-simple-2"),
+       "check_bank_transfer-498c-2"),
 
     TALER_TESTING_cmd_merchant_track_transfer
       ("track-transfer-2-again",
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "check_bank_transfer-498c-2",
-       "deposit-simple-2"),
+       "check_bank_transfer-498c-2"),
 
     TALER_TESTING_cmd_merchant_track_transaction
       ("track-transaction-2",
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "check_bank_transfer-498c-2",
-       "deposit-simple-2",
-       "EUR:0.01"),
+       "deposit-simple-2"),
 
     TALER_TESTING_cmd_history ("history-1",
                                merchant_url,
diff --git a/src/lib/testing_api_cmd_tip.c b/src/lib/testing_api_cmd_tip.c
index f90afeb..e9a2842 100644
--- a/src/lib/testing_api_cmd_tip.c
+++ b/src/lib/testing_api_cmd_tip.c
@@ -96,9 +96,7 @@ struct TipPickupState
   const char **amounts;
 
   /**
-   * The object version of the above @a amounts. FIXME:
-   * try to remove and run tests to see if other commands
-   * need this data.
+   * The object version of the above @a amounts.
    */
   struct TALER_Amount *amounts_obj;
 
@@ -192,7 +190,8 @@ struct TipQueryState
   const char *expected_amount_authorized;
 
   /**
-   * FIXME: what is this?
+   * Amount that is expected to be still available
+   * from the tip reserve.
    */
   const char *expected_amount_available;
 };
@@ -557,6 +556,12 @@ TALER_TESTING_cmd_tip_authorize (const char *label,
  * @param http_status HTTP status code for this request
  * @param ec Taler-specific error code
  * @param raw raw response body
+ * @param reserve_expiration when the tip reserve will expire
+ * @param reserve_pub tip reserve public key
+ * @param amount_authorized total amount authorized on tip reserve
+ * @param amount_available total amount still available on
+ *        tip reserve
+ * @param amount_picked_up total amount picked up from tip reserve
  */
 static void
 tip_query_cb (void *cls,
@@ -682,7 +687,9 @@ tip_query_run (void *cls,
  *        picked up.
  * @param expected_amount_authorized expected amount that was
  *        authorized in the first place.
- * @param expected_amount_available FIXME what is this?
+ * @param expected_amount_available expected amount which is
+ *        still available from the tip reserve
+ * @return the command
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_tip_query_with_amounts
@@ -1056,7 +1063,13 @@ tip_pickup_cleanup (void *cls,
                     const struct TALER_TESTING_Command *cmd)
 {
   struct TipPickupState *tps = cls;
-  /* FIXME:  free elements *in* the state! */
+
+  GNUNET_free_non_null (tps->amounts_obj);
+  GNUNET_free_non_null (tps->dks);
+  GNUNET_free_non_null (tps->psa);
+  GNUNET_free_non_null (tps->withdraws);
+  GNUNET_free_non_null (tps->sigs);
+
   if (NULL != tps->tpo)
   {
     TALER_LOG_WARNING ("Tip-pickup operation"
diff --git a/src/lib/testing_api_cmd_track.c b/src/lib/testing_api_cmd_track.c
index 4d070d2..e0c43c1 100644
--- a/src/lib/testing_api_cmd_track.c
+++ b/src/lib/testing_api_cmd_track.c
@@ -76,8 +76,7 @@ struct TrackTransactionState
 
   /**
    * Binary form of @a wtid_str, expected by other commands
-   * in this form.  FIXME: ponder if one of the forms (string
-   * or binary) should be fired from this state.
+   * in this form.
    */
   struct TALER_WireTransferIdentifierRawP wtid;
 
@@ -129,10 +128,6 @@ struct TrackTransferState
    */
   const char *check_bank_reference;
 
-  /**
-   * FIXME currently not used.
-   */
-  const char *pay_reference;
 };
 
 /**
@@ -441,9 +436,8 @@ track_transaction_traits (void *cls,
  *        /track/transaction request.
  * @param ctx CURL context.
  * @param http_status expected HTTP response code.
- * @param transfer_reference FIXME not used.
  * @param pay_reference used to retrieve the order id to track.
- * @param wire_fee FIXME not used.
+ * @return the command.
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_merchant_track_transaction
@@ -451,9 +445,7 @@ TALER_TESTING_cmd_merchant_track_transaction
    const char *merchant_url,
    struct GNUNET_CURL_Context *ctx,
    unsigned int http_status,
-   const char *transfer_reference,
-   const char *pay_reference,
-   const char *wire_fee)
+   const char *pay_reference)
 {
   struct TrackTransactionState *tts;
   struct TALER_TESTING_Command cmd;
@@ -469,7 +461,6 @@ TALER_TESTING_cmd_merchant_track_transaction
   cmd.run = &track_transaction_run;
   cmd.cleanup = &track_transaction_cleanup;
   cmd.traits = &track_transaction_traits;
-  // traits?
 
   return cmd;
 }
@@ -486,7 +477,7 @@ TALER_TESTING_cmd_merchant_track_transaction
  * @param check_bank_reference reference to a "check bank" CMD
  *        that will provide the WTID and exchange URL to issue
  *        the track against.
- * @param pay_reference FIXME not used.
+ * @return the command.
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_merchant_track_transfer
@@ -494,8 +485,7 @@ TALER_TESTING_cmd_merchant_track_transfer
    const char *merchant_url,
    struct GNUNET_CURL_Context *ctx,
    unsigned int http_status,
-   const char *check_bank_reference,
-   const char *pay_reference)
+   const char *check_bank_reference)
 {
   struct TrackTransferState *tts;
   struct TALER_TESTING_Command cmd;
@@ -505,13 +495,11 @@ TALER_TESTING_cmd_merchant_track_transfer
   tts->ctx = ctx;
   tts->http_status = http_status;
   tts->check_bank_reference = check_bank_reference;
-  tts->pay_reference = pay_reference;
 
   cmd.cls = tts;
   cmd.label = label;
   cmd.run = &track_transfer_run;
   cmd.cleanup = &track_transfer_cleanup;
-  // traits?
 
   return cmd;
 }
diff --git a/src/merchant-tools/taler-merchant-generate-payments.c 
b/src/merchant-tools/taler-merchant-generate-payments.c
index 7766c83..93cd132 100644
--- a/src/merchant-tools/taler-merchant-generate-payments.c
+++ b/src/merchant-tools/taler-merchant-generate-payments.c
@@ -363,17 +363,14 @@ run (void *cls,
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "dummy", // "check bank" CMD, never used, to be deleted.
-       "deposit-simple-2",
-       CURRENCY_0_01),
+       "deposit-simple-2"),
 
     TALER_TESTING_cmd_merchant_track_transfer
       ("track-transfer-1",
        merchant_url,
        is->ctx,
        MHD_HTTP_OK,
-       "track-transaction-1",
-       "deposit-simple-2"),
+       "track-transaction-1"),
 
     TALER_TESTING_cmd_rewind_ip
       ("rewind-tracks",

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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