aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_abort_order.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-10-28 20:35:16 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-28 20:35:16 +0200
commitca87a98695221ea3b8beb08c40cf04f6afe7bd2c (patch)
tree06ea5dd9d74059bdcbddf1e7a1ec489a43dfdcf9 /src/testing/testing_api_cmd_abort_order.c
parent9939a99f6c29876f4ad213febf3a0d29fc765cdb (diff)
downloadmerchant-ca87a98695221ea3b8beb08c40cf04f6afe7bd2c.tar.gz
merchant-ca87a98695221ea3b8beb08c40cf04f6afe7bd2c.tar.bz2
merchant-ca87a98695221ea3b8beb08c40cf04f6afe7bd2c.zip
-work on FTBFS of src/testing
Diffstat (limited to 'src/testing/testing_api_cmd_abort_order.c')
-rw-r--r--src/testing/testing_api_cmd_abort_order.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/src/testing/testing_api_cmd_abort_order.c b/src/testing/testing_api_cmd_abort_order.c
index 966d93ff..d2e2d357 100644
--- a/src/testing/testing_api_cmd_abort_order.c
+++ b/src/testing/testing_api_cmd_abort_order.c
@@ -28,8 +28,6 @@
#include "taler_merchant_service.h"
#include "taler_merchant_testing_lib.h"
-#define AMOUNT_WITH_FEE 0
-
/**
* State for a " abort" CMD.
*/
@@ -85,19 +83,15 @@ struct AbortState
* @param[in] coins string specifying coins to add to @a pc,
* clobbered in the process
* @param is interpreter state
- * @param amount_with_fee total amount to be paid for a contract.
* @return #GNUNET_OK on success
*/
-static int
+static enum GNUNET_GenericReturnValue
build_coins (struct TALER_MERCHANT_AbortCoin **ac,
unsigned int *nac,
char *coins,
- struct TALER_TESTING_Interpreter *is,
- const char *amount_with_fee)
+ struct TALER_TESTING_Interpreter *is)
{
- char *token;
-
- for (token = strtok (coins, ";");
+ for (char *token = strtok (coins, ";");
NULL != token;
token = strtok (NULL, ";"))
{
@@ -123,6 +117,8 @@ build_coins (struct TALER_MERCHANT_AbortCoin **ac,
// FIXME: ci not used!?
{
const struct TALER_TESTING_Command *coin_cmd;
+ const char **exchange_url;
+
coin_cmd = TALER_TESTING_interpreter_lookup_command (is,
token);
if (NULL == coin_cmd)
@@ -146,9 +142,9 @@ build_coins (struct TALER_MERCHANT_AbortCoin **ac,
&icoin->coin_pub.eddsa_pub);
}
GNUNET_assert (GNUNET_OK ==
- TALER_TESTING_get_trait_url (coin_cmd,
- TALER_TESTING_UT_EXCHANGE_BASE_URL,
- &icoin->exchange_url));
+ TALER_TESTING_get_trait_exchange_url (coin_cmd,
+ &exchange_url));
+ icoin->exchange_url = *exchange_url;
{
const struct TALER_Amount *denom_value;
@@ -230,9 +226,8 @@ abort_run (void *cls,
{
struct AbortState *as = cls;
const struct TALER_TESTING_Command *pay_cmd;
- const char *proposal_reference;
- const char *coin_reference;
- const char *amount_with_fee;
+ const char **proposal_reference;
+ const char **coin_reference;
const struct TALER_TESTING_Command *proposal_cmd;
const char *order_id;
const struct TALER_PrivateContractHash *h_proposal;
@@ -258,13 +253,8 @@ abort_run (void *cls,
0,
&coin_reference))
TALER_TESTING_FAIL (is);
- if (GNUNET_OK !=
- TALER_TESTING_get_trait_string (pay_cmd,
- AMOUNT_WITH_FEE,
- &amount_with_fee))
- TALER_TESTING_FAIL (is);
proposal_cmd = TALER_TESTING_interpreter_lookup_command (is,
- proposal_reference);
+ *proposal_reference);
if (NULL == proposal_cmd)
TALER_TESTING_FAIL (is);
@@ -310,15 +300,14 @@ abort_run (void *cls,
}
}
- cr = GNUNET_strdup (coin_reference);
+ cr = GNUNET_strdup (*coin_reference);
abort_coins = NULL;
nabort_coins = 0;
if (GNUNET_OK !=
build_coins (&abort_coins,
&nabort_coins,
cr,
- is,
- amount_with_fee))
+ is))
{
GNUNET_array_grow (abort_coins,
nabort_coins,