LCOV - code coverage report
Current view: top level - testing - testing_api_cmd_get_orders.c (source / functions) Hit Total Coverage
Test: GNU Taler coverage report Lines: 0 158 0.0 %
Date: 2020-08-15 06:12:35 Functions: 0 12 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   This file is part of TALER
       3             :   Copyright (C) 2020 Taler Systems SA
       4             : 
       5             :   TALER is free software; you can redistribute it and/or modify
       6             :   it under the terms of the GNU General Public License as
       7             :   published by the Free Software Foundation; either version 3, or
       8             :   (at your option) any later version.
       9             : 
      10             :   TALER is distributed in the hope that it will be useful, but
      11             :   WITHOUT ANY WARRANTY; without even the implied warranty of
      12             :   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13             :   GNU General Public License for more details.
      14             : 
      15             :   You should have received a copy of the GNU General Public
      16             :   License along with TALER; see the file COPYING.  If not, see
      17             :   <http://www.gnu.org/licenses/>
      18             : */
      19             : /**
      20             :  * @file lib/testing_api_cmd_get_orders.c
      21             :  * @brief command to test GET /orders
      22             :  * @author Jonathan Buchanan
      23             :  */
      24             : #include "platform.h"
      25             : #include <taler/taler_exchange_service.h>
      26             : #include <taler/taler_testing_lib.h>
      27             : #include "taler_merchant_service.h"
      28             : #include "taler_merchant_testing_lib.h"
      29             : 
      30             : 
      31             : /**
      32             :  * State of a "GET orders" CMD.
      33             :  */
      34             : struct GetOrdersState
      35             : {
      36             : 
      37             :   /**
      38             :    * Handle for a "GET orders" request.
      39             :    */
      40             :   struct TALER_MERCHANT_OrdersGetHandle *ogh;
      41             : 
      42             :   /**
      43             :    * The interpreter state.
      44             :    */
      45             :   struct TALER_TESTING_Interpreter *is;
      46             : 
      47             :   /**
      48             :    * Base URL of the merchant serving the request.
      49             :    */
      50             :   const char *merchant_url;
      51             : 
      52             :   /**
      53             :    * Expected HTTP response code.
      54             :    */
      55             :   unsigned int http_status;
      56             : 
      57             :   /**
      58             :    * A NULL-terminated array of CMD labels that created orders.
      59             :    */
      60             :   const char **orders;
      61             : 
      62             :   /**
      63             :    * The length of @e orders.
      64             :    */
      65             :   unsigned int orders_length;
      66             : 
      67             : };
      68             : 
      69             : 
      70             : /**
      71             :  * Callback for a GET /orders operation.
      72             :  *
      73             :  * @param cls closure for this function
      74             :  */
      75             : static void
      76           0 : get_orders_cb (void *cls,
      77             :                const struct TALER_MERCHANT_HttpResponse *hr,
      78             :                unsigned int orders_length,
      79             :                const struct TALER_MERCHANT_OrderEntry orders[])
      80             : {
      81           0 :   struct GetOrdersState *gos = cls;
      82             : 
      83           0 :   gos->ogh = NULL;
      84           0 :   if (gos->http_status != hr->http_status)
      85             :   {
      86           0 :     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
      87             :                 "Unexpected response code %u (%d) to command %s\n",
      88             :                 hr->http_status,
      89             :                 (int) hr->ec,
      90             :                 TALER_TESTING_interpreter_get_current_label (gos->is));
      91           0 :     TALER_TESTING_interpreter_fail (gos->is);
      92           0 :     return;
      93             :   }
      94           0 :   switch (hr->http_status)
      95             :   {
      96           0 :   case MHD_HTTP_OK:
      97           0 :     if (orders_length != gos->orders_length)
      98             :     {
      99           0 :       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     100             :                   "Number of orders found does not match\n");
     101           0 :       TALER_TESTING_interpreter_fail (gos->is);
     102           0 :       return;
     103             :     }
     104           0 :     for (unsigned int i = 0; i < orders_length; ++i)
     105             :     {
     106             :       const struct TALER_TESTING_Command *order_cmd;
     107             : 
     108           0 :       order_cmd = TALER_TESTING_interpreter_lookup_command (
     109             :         gos->is,
     110           0 :         gos->orders[i]);
     111             : 
     112             :       {
     113             :         const char *order_id;
     114           0 :         if (GNUNET_OK !=
     115           0 :             TALER_TESTING_get_trait_order_id (order_cmd,
     116             :                                               0,
     117             :                                               &order_id))
     118             :         {
     119           0 :           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     120             :                       "Could not fetch order id\n");
     121           0 :           TALER_TESTING_interpreter_fail (gos->is);
     122           0 :           return;
     123             :         }
     124           0 :         if (0 != strcmp (orders[i].order_id,
     125             :                          order_id))
     126             :         {
     127           0 :           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     128             :                       "Order id does not match\n");
     129           0 :           TALER_TESTING_interpreter_fail (gos->is);
     130           0 :           return;
     131             :         }
     132             :       }
     133             :       {
     134             :         const json_t *contract_terms;
     135             :         struct TALER_Amount amount;
     136             :         const char *summary;
     137             :         struct GNUNET_JSON_Specification spec[] = {
     138           0 :           GNUNET_JSON_spec_string ("summary",
     139             :                                    &summary),
     140           0 :           TALER_JSON_spec_amount ("amount",
     141             :                                   &amount),
     142           0 :           GNUNET_JSON_spec_end ()
     143             :         };
     144             : 
     145           0 :         if (GNUNET_OK !=
     146           0 :             TALER_TESTING_get_trait_contract_terms (order_cmd,
     147             :                                                     0,
     148             :                                                     &contract_terms))
     149             :         {
     150           0 :           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     151             :                       "Could not fetch order contract terms\n");
     152           0 :           TALER_TESTING_interpreter_fail (gos->is);
     153           0 :           return;
     154             :         }
     155           0 :         if (GNUNET_OK !=
     156           0 :             GNUNET_JSON_parse (contract_terms,
     157             :                                spec,
     158             :                                NULL, NULL))
     159             :         {
     160           0 :           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     161             :                       "Could not parse order contract terms\n");
     162           0 :           TALER_TESTING_interpreter_fail (gos->is);
     163           0 :           return;
     164             :         }
     165           0 :         if ((0 != strcmp (summary,
     166           0 :                           orders[i].summary)) ||
     167           0 :             (GNUNET_OK != TALER_amount_cmp_currency (&amount,
     168           0 :                                                      &orders[i].amount)) ||
     169           0 :             (0 != TALER_amount_cmp (&amount,
     170           0 :                                     &orders[i].amount)))
     171             :         {
     172           0 :           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     173             :                       "Order summary and/or amount does not match\n");
     174           0 :           TALER_TESTING_interpreter_fail (gos->is);
     175           0 :           return;
     176             :         }
     177             :       }
     178             :     }
     179           0 :     break;
     180           0 :   default:
     181           0 :     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
     182             :                 "Unhandled HTTP status.\n");
     183             :   }
     184           0 :   TALER_TESTING_interpreter_next (gos->is);
     185             : }
     186             : 
     187             : 
     188             : /**
     189             :  * Run the "GET /orders" CMD.
     190             :  *
     191             :  *
     192             :  * @param cls closure.
     193             :  * @param cmd command being run now.
     194             :  * @param is interpreter state.
     195             :  */
     196             : static void
     197           0 : get_orders_run (void *cls,
     198             :                 const struct TALER_TESTING_Command *cmd,
     199             :                 struct TALER_TESTING_Interpreter *is)
     200             : {
     201           0 :   struct GetOrdersState *gos = cls;
     202             : 
     203           0 :   gos->is = is;
     204           0 :   gos->ogh = TALER_MERCHANT_orders_get (is->ctx,
     205             :                                         gos->merchant_url,
     206             :                                         &get_orders_cb,
     207             :                                         gos);
     208           0 :   GNUNET_assert (NULL != gos->ogh);
     209           0 : }
     210             : 
     211             : 
     212             : /**
     213             :  * Free the state of a "GET orders" CMD, and possibly
     214             :  * cancel a pending operation thereof.
     215             :  *
     216             :  * @param cls closure.
     217             :  * @param cmd command being run.
     218             :  */
     219             : static void
     220           0 : get_orders_cleanup (void *cls,
     221             :                     const struct TALER_TESTING_Command *cmd)
     222             : {
     223           0 :   struct GetOrdersState *gos = cls;
     224             : 
     225           0 :   if (NULL != gos->ogh)
     226             :   {
     227           0 :     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
     228             :                 "GET /orders operation did not complete\n");
     229           0 :     TALER_MERCHANT_orders_get_cancel (gos->ogh);
     230             :   }
     231           0 :   GNUNET_free (gos);
     232           0 : }
     233             : 
     234             : 
     235             : /**
     236             :  * Define a "GET /orders" CMD.
     237             :  *
     238             :  * @param label command label.
     239             :  * @param merchant_url base URL of the merchant serving the
     240             :  *        GET /orders request.
     241             :  * @param http_status expected HTTP response code.
     242             :  * @param ... NULL-terminated list of labels (const char *) of
     243             :  *        reserve (commands) we expect to be returned in the list
     244             :  *        (assuming @a http_code is #MHD_HTTP_OK)
     245             :  * @return the command.
     246             :  */
     247             : struct TALER_TESTING_Command
     248           0 : TALER_TESTING_cmd_merchant_get_orders (const char *label,
     249             :                                        const char *merchant_url,
     250             :                                        unsigned int http_status,
     251             :                                        ...)
     252             : {
     253             :   struct GetOrdersState *gos;
     254             : 
     255           0 :   gos = GNUNET_new (struct GetOrdersState);
     256           0 :   gos->merchant_url = merchant_url;
     257           0 :   gos->http_status = http_status;
     258             :   {
     259             :     const char *clabel;
     260             :     va_list ap;
     261             : 
     262           0 :     va_start (ap, http_status);
     263           0 :     while (NULL != (clabel = va_arg (ap, const char *)))
     264             :     {
     265           0 :       GNUNET_array_append (gos->orders,
     266             :                            gos->orders_length,
     267             :                            clabel);
     268             :     }
     269           0 :     va_end (ap);
     270             :   }
     271             :   {
     272           0 :     struct TALER_TESTING_Command cmd = {
     273             :       .cls = gos,
     274             :       .label = label,
     275             :       .run = &get_orders_run,
     276             :       .cleanup = &get_orders_cleanup
     277             :     };
     278             : 
     279           0 :     return cmd;
     280             :   }
     281             : }
     282             : 
     283             : 
     284             : struct MerchantPollOrdersConcludeState
     285             : {
     286             :   /**
     287             :    * The interpreter state.
     288             :    */
     289             :   struct TALER_TESTING_Interpreter *is;
     290             : 
     291             :   /**
     292             :    * Reference to a command that can provide a poll orders start command.
     293             :    */
     294             :   const char *start_reference;
     295             : 
     296             :   /**
     297             :    * Task to wait for the deadline.
     298             :    */
     299             :   struct GNUNET_SCHEDULER_Task *task;
     300             : 
     301             :   /**
     302             :    * Expected HTTP response status code.
     303             :    */
     304             :   unsigned int expected_http_status;
     305             : };
     306             : 
     307             : 
     308             : struct MerchantPollOrdersStartState
     309             : {
     310             :   /**
     311             :    * The merchant base URL.
     312             :    */
     313             :   const char *merchant_url;
     314             : 
     315             :   /**
     316             :    * The handle to the current GET /private/orders request.
     317             :    */
     318             :   struct TALER_MERCHANT_OrdersGetHandle *ogh;
     319             : 
     320             :   /**
     321             :    * The interpreter state.
     322             :    */
     323             :   struct TALER_TESTING_Interpreter *is;
     324             : 
     325             :   /**
     326             :    * How long to wait for server to return a response.
     327             :    */
     328             :   struct GNUNET_TIME_Relative timeout;
     329             : 
     330             :   /**
     331             :    * Conclude state waiting for completion (if any).
     332             :    */
     333             :   struct MerchantPollOrdersConcludeState *cs;
     334             : 
     335             :   /**
     336             :    * The HTTP status code returned by the backend.
     337             :    */
     338             :   unsigned int http_status;
     339             : 
     340             :   /**
     341             :    * When the request should be completed by.
     342             :    */
     343             :   struct GNUNET_TIME_Absolute deadline;
     344             : };
     345             : 
     346             : 
     347             : /**
     348             :  * Task called when either the timeout for the get orders
     349             :  * command expired or we got a response.  Checks if the
     350             :  * result is what we expected.
     351             :  *
     352             :  * @param cls a `struct MerchantPollOrdersConcludeState`
     353             :  */
     354             : static void
     355           0 : conclude_task (void *cls)
     356             : {
     357           0 :   struct MerchantPollOrdersConcludeState *poc = cls;
     358             :   const struct TALER_TESTING_Command *poll_cmd;
     359             :   struct MerchantPollOrdersStartState *pos;
     360             :   struct GNUNET_TIME_Absolute now;
     361             : 
     362           0 :   poc->task = NULL;
     363             :   poll_cmd =
     364           0 :     TALER_TESTING_interpreter_lookup_command (poc->is,
     365             :                                               poc->start_reference);
     366           0 :   if (NULL == poll_cmd)
     367           0 :     TALER_TESTING_FAIL (poc->is);
     368           0 :   pos = poll_cmd->cls;
     369           0 :   if (NULL != pos->ogh)
     370             :   {
     371           0 :     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     372             :                 "Expected poll GET /private/orders to have completed, but it did not!\n");
     373           0 :     TALER_TESTING_FAIL (poc->is);
     374             :   }
     375           0 :   if (pos->http_status != poc->expected_http_status)
     376             :   {
     377           0 :     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     378             :                 "Expected HTTP status %u, got %u\n",
     379             :                 poc->expected_http_status,
     380             :                 pos->http_status);
     381           0 :     TALER_TESTING_FAIL (poc->is);
     382             :   }
     383           0 :   now = GNUNET_TIME_absolute_get ();
     384           0 :   if ((GNUNET_TIME_absolute_add (pos->deadline,
     385           0 :                                  GNUNET_TIME_UNIT_SECONDS).abs_value_us <
     386           0 :        now.abs_value_us) )
     387             :   {
     388           0 :     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     389             :                 "Expected answer to be delayed until %llu, but got response at %llu\n",
     390             :                 (unsigned long long) pos->deadline.abs_value_us,
     391             :                 (unsigned long long) now.abs_value_us);
     392           0 :     TALER_TESTING_FAIL (poc->is);
     393             :   }
     394           0 :   TALER_TESTING_interpreter_next (poc->is);
     395             : }
     396             : 
     397             : 
     398             : /**
     399             :  * Callback to process a GET /orders request
     400             :  *
     401             :  * @param cls closure
     402             :  * @param hr HTTP response details
     403             :  * @param osr order status response details (on success)
     404             :  */
     405             : static void
     406           0 : merchant_poll_orders_cb (
     407             :   void *cls,
     408             :   const struct TALER_MERCHANT_HttpResponse *hr,
     409             :   unsigned int orders_length,
     410             :   const struct TALER_MERCHANT_OrderEntry orders[])
     411             : {
     412             :   /* FIXME, deeper checks should be implemented here. */
     413           0 :   struct MerchantPollOrdersStartState *pos = cls;
     414             : 
     415           0 :   pos->ogh = NULL;
     416           0 :   if (MHD_HTTP_OK != hr->http_status)
     417             :   {
     418           0 :     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
     419             :                 "Unexpected response code %u (%d) to command %s\n",
     420             :                 hr->http_status,
     421             :                 (int) hr->ec,
     422             :                 TALER_TESTING_interpreter_get_current_label (pos->is));
     423           0 :     TALER_TESTING_interpreter_fail (pos->is);
     424           0 :     return;
     425             :   }
     426           0 :   switch (hr->http_status)
     427             :   {
     428           0 :   case MHD_HTTP_OK:
     429             :     // FIXME: use order references
     430             :     // check if the data returned matches that from the POST / PATCH
     431           0 :     break;
     432           0 :   default:
     433           0 :     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
     434             :                 "Unhandled HTTP status.\n");
     435             :   }
     436           0 :   pos->http_status = hr->http_status;
     437           0 :   if (NULL != pos->cs)
     438             :   {
     439           0 :     GNUNET_SCHEDULER_cancel (pos->cs->task);
     440           0 :     pos->cs->task = GNUNET_SCHEDULER_add_now (&conclude_task,
     441           0 :                                               pos->cs);
     442             :   }
     443             : }
     444             : 
     445             : 
     446             : /**
     447             :  * Run the "GET orders" CMD.
     448             :  *
     449             :  * @param cls closure.
     450             :  * @param cmd command being run now.
     451             :  * @param is interpreter state.
     452             :  */
     453             : static void
     454           0 : merchant_poll_orders_start_run (void *cls,
     455             :                                 const struct TALER_TESTING_Command *cmd,
     456             :                                 struct TALER_TESTING_Interpreter *is)
     457             : {
     458           0 :   struct MerchantPollOrdersStartState *pos = cls;
     459             : 
     460             :   /* add 1s grace time to timeout */
     461             :   pos->deadline
     462           0 :     = GNUNET_TIME_absolute_add (GNUNET_TIME_relative_to_absolute (pos->timeout),
     463             :                                 GNUNET_TIME_UNIT_SECONDS);
     464           0 :   pos->is = is;
     465           0 :   pos->ogh = TALER_MERCHANT_orders_get2 (is->ctx,
     466             :                                          pos->merchant_url,
     467             :                                          TALER_EXCHANGE_YNA_ALL,
     468             :                                          TALER_EXCHANGE_YNA_ALL,
     469             :                                          TALER_EXCHANGE_YNA_ALL,
     470             :                                          GNUNET_TIME_UNIT_ZERO_ABS,
     471             :                                          1,
     472             :                                          2,
     473             :                                          pos->timeout,
     474             :                                          &merchant_poll_orders_cb,
     475             :                                          pos);
     476           0 :   GNUNET_assert (NULL != pos->ogh);
     477             :   /* We CONTINUE to run the interpreter while the long-polled command
     478             :      completes asynchronously! */
     479           0 :   TALER_TESTING_interpreter_next (pos->is);
     480           0 : }
     481             : 
     482             : 
     483             : /**
     484             :  * Free the state of a "GET orders" CMD, and possibly
     485             :  * cancel a pending operation thereof.
     486             :  *
     487             :  * @param cls closure.
     488             :  * @param cmd command being run.
     489             :  */
     490             : static void
     491           0 : merchant_poll_orders_start_cleanup (void *cls,
     492             :                                     const struct TALER_TESTING_Command *cmd)
     493             : {
     494           0 :   struct MerchantPollOrdersStartState *pos = cls;
     495             : 
     496           0 :   if (NULL != pos->ogh)
     497             :   {
     498           0 :     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
     499             :                 "Command `%s' was not terminated\n",
     500             :                 TALER_TESTING_interpreter_get_current_label (
     501             :                   pos->is));
     502           0 :     TALER_MERCHANT_orders_get_cancel (pos->ogh);
     503             :   }
     504           0 :   GNUNET_free (pos);
     505           0 : }
     506             : 
     507             : 
     508             : /**
     509             :  * Start a long poll for GET /private/orders.
     510             :  */
     511             : struct TALER_TESTING_Command
     512           0 : TALER_TESTING_cmd_poll_orders_start (const char *label,
     513             :                                      const char *merchant_url,
     514             :                                      struct GNUNET_TIME_Relative timeout)
     515             : {
     516             :   struct MerchantPollOrdersStartState *pos;
     517             : 
     518           0 :   pos = GNUNET_new (struct MerchantPollOrdersStartState);
     519           0 :   pos->merchant_url = merchant_url;
     520           0 :   pos->timeout = timeout;
     521             :   {
     522           0 :     struct TALER_TESTING_Command cmd = {
     523             :       .cls = pos,
     524             :       .label = label,
     525             :       .run = &merchant_poll_orders_start_run,
     526             :       .cleanup = &merchant_poll_orders_start_cleanup
     527             :     };
     528             : 
     529           0 :     return cmd;
     530             :   }
     531             : }
     532             : 
     533             : 
     534             : /**
     535             :  * Run the "GET orders" CMD.
     536             :  *
     537             :  * @param cls closure.
     538             :  * @param cmd command being run now.
     539             :  * @param is interpreter state.
     540             :  */
     541             : static void
     542           0 : merchant_poll_orders_conclude_run (void *cls,
     543             :                                    const struct TALER_TESTING_Command *cmd,
     544             :                                    struct TALER_TESTING_Interpreter *is)
     545             : {
     546           0 :   struct MerchantPollOrdersConcludeState *poc = cls;
     547             :   const struct TALER_TESTING_Command *poll_cmd;
     548             :   struct MerchantPollOrdersStartState *pos;
     549             : 
     550           0 :   poc->is = is;
     551             :   poll_cmd =
     552           0 :     TALER_TESTING_interpreter_lookup_command (is,
     553             :                                               poc->start_reference);
     554           0 :   if (NULL == poll_cmd)
     555           0 :     TALER_TESTING_FAIL (poc->is);
     556           0 :   GNUNET_assert (poll_cmd->run == &merchant_poll_orders_start_run);
     557           0 :   pos = poll_cmd->cls;
     558           0 :   pos->cs = poc;
     559           0 :   if (NULL == pos->ogh)
     560           0 :     poc->task = GNUNET_SCHEDULER_add_now (&conclude_task,
     561             :                                           poc);
     562             :   else
     563           0 :     poc->task = GNUNET_SCHEDULER_add_at (pos->deadline,
     564             :                                          &conclude_task,
     565             :                                          poc);
     566             : }
     567             : 
     568             : 
     569             : /**
     570             :  * Free the state of a "GET orders" CMD, and possibly
     571             :  * cancel a pending operation thereof.
     572             :  *
     573             :  * @param cls closure.
     574             :  * @param cmd command being run.
     575             :  */
     576             : static void
     577           0 : merchant_poll_orders_conclude_cleanup (void *cls,
     578             :                                        const struct TALER_TESTING_Command *cmd)
     579             : {
     580           0 :   struct MerchantPollOrdersConcludeState *poc = cls;
     581             : 
     582           0 :   if (NULL != poc->task)
     583             :   {
     584           0 :     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
     585             :                 "Command `%s' was not terminated\n",
     586             :                 TALER_TESTING_interpreter_get_current_label (
     587             :                   poc->is));
     588           0 :     GNUNET_SCHEDULER_cancel (poc->task);
     589           0 :     poc->task = NULL;
     590             :   }
     591           0 :   GNUNET_free (poc);
     592           0 : }
     593             : 
     594             : 
     595             : /**
     596             :  * Complete a long poll for GET /private/orders.
     597             :  */
     598             : struct TALER_TESTING_Command
     599           0 : TALER_TESTING_cmd_poll_orders_conclude (const char *label,
     600             :                                         unsigned int http_status,
     601             :                                         const char *poll_start_reference)
     602             : {
     603             :   struct MerchantPollOrdersConcludeState *poc;
     604             : 
     605           0 :   poc = GNUNET_new (struct MerchantPollOrdersConcludeState);
     606           0 :   poc->start_reference = poll_start_reference;
     607           0 :   poc->expected_http_status = http_status;
     608             :   {
     609           0 :     struct TALER_TESTING_Command cmd = {
     610             :       .cls = poc,
     611             :       .label = label,
     612             :       .run = &merchant_poll_orders_conclude_run,
     613             :       .cleanup = &merchant_poll_orders_conclude_cleanup
     614             :     };
     615             : 
     616           0 :     return cmd;
     617             :   }
     618             : }
     619             : 
     620             : 
     621             : /* end of testing_api_cmd_get_orders.c */

Generated by: LCOV version 1.14