getting test_auditor_api to pass

This commit is contained in:
Christian Grothoff 2018-11-25 14:40:03 +01:00
parent 55015a2332
commit 5052698cbc
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
16 changed files with 98 additions and 53 deletions

View File

@ -270,6 +270,27 @@ run (void *cls,
* a lot! * a lot!
*/ */
CMD_EXEC_AGGREGATOR ("run-aggregator"), CMD_EXEC_AGGREGATOR ("run-aggregator"),
/**
* Check all the transfers took place.
*/
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-499c", exchange_url,
"EUR:4.98", 2, 42),
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-99c1", exchange_url,
"EUR:0.98", 2, 42),
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-99c", exchange_url,
"EUR:0.08", 2, 43),
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-aai-1", exchange_url,
"EUR:5.01", 42, 2),
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-aai-2", exchange_url,
"EUR:5.01", 42, 2),
TALER_TESTING_cmd_check_bank_empty ("check_bank_empty"),
TALER_TESTING_cmd_end () TALER_TESTING_cmd_end ()
}; };
@ -505,12 +526,6 @@ main (int argc,
GNUNET_log_setup ("test-auditor-api", GNUNET_log_setup ("test-auditor-api",
"INFO", "INFO",
NULL); NULL);
if (1)
{
TALER_LOG_WARNING ("Test not yet ready\n");
return 77; // FIXME: test not yet ready
}
if (NULL == (fakebank_url if (NULL == (fakebank_url
/* Check fakebank port is available and config cares /* Check fakebank port is available and config cares
* about bank url. */ * about bank url. */

View File

@ -419,7 +419,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
(void) GNUNET_TIME_round_abs (&refund_deadline); (void) GNUNET_TIME_round_abs (&refund_deadline);
GNUNET_assert (refund_deadline.abs_value_us <= wire_deadline.abs_value_us); GNUNET_assert (refund_deadline.abs_value_us <= wire_deadline.abs_value_us);
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
MAH_handle_is_ready (exchange)); TEAH_handle_is_ready (exchange));
/* initialize h_wire */ /* initialize h_wire */
if (GNUNET_OK != if (GNUNET_OK !=
TALER_JSON_merchant_wire_signature_hash (wire_details, TALER_JSON_merchant_wire_signature_hash (wire_details,
@ -483,7 +483,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
dh->exchange = exchange; dh->exchange = exchange;
dh->cb = cb; dh->cb = cb;
dh->cb_cls = cb_cls; dh->cb_cls = cb_cls;
dh->url = MAH_path_to_url (exchange, "/deposit"); dh->url = TEAH_path_to_url (exchange, "/deposit");
dh->depconf.purpose.size = htonl (sizeof (struct TALER_DepositConfirmationPS)); dh->depconf.purpose.size = htonl (sizeof (struct TALER_DepositConfirmationPS));
dh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT); dh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT);
dh->depconf.h_contract_terms = *h_contract_terms; dh->depconf.h_contract_terms = *h_contract_terms;
@ -513,7 +513,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (dh->json_enc))); strlen (dh->json_enc)));
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
dh->job = GNUNET_CURL_job_add (ctx, dh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -976,7 +976,7 @@ keys_completed_cb (void *cls,
* @return ctx context to execute jobs in * @return ctx context to execute jobs in
*/ */
struct GNUNET_CURL_Context * struct GNUNET_CURL_Context *
MAH_handle_to_context (struct TALER_EXCHANGE_Handle *h) TEAH_handle_to_context (struct TALER_EXCHANGE_Handle *h)
{ {
return h->ctx; return h->ctx;
} }
@ -989,7 +989,7 @@ MAH_handle_to_context (struct TALER_EXCHANGE_Handle *h)
* @return #GNUNET_YES if we are ready, #GNUNET_NO if not * @return #GNUNET_YES if we are ready, #GNUNET_NO if not
*/ */
int int
MAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h) TEAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h)
{ {
return (MHS_CERT == h->state) ? GNUNET_YES : GNUNET_NO; return (MHS_CERT == h->state) ? GNUNET_YES : GNUNET_NO;
} }
@ -1003,10 +1003,10 @@ MAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h)
* @return the full URL to use with cURL * @return the full URL to use with cURL
*/ */
char * char *
MAH_path_to_url (struct TALER_EXCHANGE_Handle *h, TEAH_path_to_url (struct TALER_EXCHANGE_Handle *h,
const char *path) const char *path)
{ {
return MAH_path_to_url2 (h->url, return TEAH_path_to_url2 (h->url,
path); path);
} }
@ -1019,7 +1019,7 @@ MAH_path_to_url (struct TALER_EXCHANGE_Handle *h,
* @return the full URL to use with cURL * @return the full URL to use with cURL
*/ */
char * char *
MAH_path_to_url2 (const char *base_url, TEAH_path_to_url2 (const char *base_url,
const char *path) const char *path)
{ {
char *url; char *url;
@ -1443,20 +1443,20 @@ request_keys (void *cls)
kr = GNUNET_new (struct KeysRequest); kr = GNUNET_new (struct KeysRequest);
kr->exchange = exchange; kr->exchange = exchange;
if (GNUNET_YES == if (GNUNET_YES ==
MAH_handle_is_ready (exchange)) TEAH_handle_is_ready (exchange))
{ {
char *arg; char *arg;
GNUNET_asprintf (&arg, GNUNET_asprintf (&arg,
"/keys?last_issue_date=%llu", "/keys?last_issue_date=%llu",
(unsigned long long) exchange->key_data.last_denom_issue_date.abs_value_us / 1000000LLU); (unsigned long long) exchange->key_data.last_denom_issue_date.abs_value_us / 1000000LLU);
kr->url = MAH_path_to_url (exchange, kr->url = TEAH_path_to_url (exchange,
arg); arg);
GNUNET_free (arg); GNUNET_free (arg);
} }
else else
{ {
kr->url = MAH_path_to_url (exchange, kr->url = TEAH_path_to_url (exchange,
"/keys"); "/keys");
} }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,

View File

@ -31,7 +31,7 @@
* @return ctx context to execute jobs in * @return ctx context to execute jobs in
*/ */
struct GNUNET_CURL_Context * struct GNUNET_CURL_Context *
MAH_handle_to_context (struct TALER_EXCHANGE_Handle *h); TEAH_handle_to_context (struct TALER_EXCHANGE_Handle *h);
/** /**
@ -41,7 +41,7 @@ MAH_handle_to_context (struct TALER_EXCHANGE_Handle *h);
* @return #GNUNET_YES if we are ready, #GNUNET_NO if not * @return #GNUNET_YES if we are ready, #GNUNET_NO if not
*/ */
int int
MAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h); TEAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h);
/** /**
@ -52,7 +52,7 @@ MAH_handle_is_ready (struct TALER_EXCHANGE_Handle *h);
* @return the full URL to use with cURL * @return the full URL to use with cURL
*/ */
char * char *
MAH_path_to_url (struct TALER_EXCHANGE_Handle *h, TEAH_path_to_url (struct TALER_EXCHANGE_Handle *h,
const char *path); const char *path);
@ -64,7 +64,7 @@ MAH_path_to_url (struct TALER_EXCHANGE_Handle *h,
* @return the full URL to use with cURL * @return the full URL to use with cURL
*/ */
char * char *
MAH_path_to_url2 (const char *base_url, TEAH_path_to_url2 (const char *base_url,
const char *path); const char *path);

View File

@ -284,7 +284,7 @@ TALER_EXCHANGE_payback (struct TALER_EXCHANGE_Handle *exchange,
CURL *eh; CURL *eh;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
MAH_handle_is_ready (exchange)); TEAH_handle_is_ready (exchange));
pr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_PAYBACK); pr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_PAYBACK);
pr.purpose.size = htonl (sizeof (struct TALER_PaybackRequestPS)); pr.purpose.size = htonl (sizeof (struct TALER_PaybackRequestPS));
GNUNET_CRYPTO_eddsa_key_get_public (&ps->coin_priv.eddsa_priv, GNUNET_CRYPTO_eddsa_key_get_public (&ps->coin_priv.eddsa_priv,
@ -317,7 +317,7 @@ TALER_EXCHANGE_payback (struct TALER_EXCHANGE_Handle *exchange,
ph->pk = pk; ph->pk = pk;
ph->cb = payback_cb; ph->cb = payback_cb;
ph->cb_cls = payback_cb_cls; ph->cb_cls = payback_cb_cls;
ph->url = MAH_path_to_url (exchange, "/payback"); ph->url = TEAH_path_to_url (exchange, "/payback");
ph->json_enc = json_dumps (payback_obj, ph->json_enc = json_dumps (payback_obj,
JSON_COMPACT); JSON_COMPACT);
@ -341,7 +341,7 @@ TALER_EXCHANGE_payback (struct TALER_EXCHANGE_Handle *exchange,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (ph->json_enc))); strlen (ph->json_enc)));
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
ph->job = GNUNET_CURL_job_add (ctx, ph->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -1153,7 +1153,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
struct TALER_RefreshMeltCoinAffirmationPS melt; struct TALER_RefreshMeltCoinAffirmationPS melt;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
MAH_handle_is_ready (exchange)); TEAH_handle_is_ready (exchange));
md = deserialize_melt_data (refresh_data, md = deserialize_melt_data (refresh_data,
refresh_data_length); refresh_data_length);
if (NULL == md) if (NULL == md)
@ -1200,7 +1200,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
rmh->melt_cb = melt_cb; rmh->melt_cb = melt_cb;
rmh->melt_cb_cls = melt_cb_cls; rmh->melt_cb_cls = melt_cb_cls;
rmh->md = md; rmh->md = md;
rmh->url = MAH_path_to_url (exchange, rmh->url = TEAH_path_to_url (exchange,
"/refresh/melt"); "/refresh/melt");
eh = TEL_curl_easy_get (rmh->url); eh = TEL_curl_easy_get (rmh->url);
GNUNET_assert (NULL != (rmh->json_enc = GNUNET_assert (NULL != (rmh->json_enc =
@ -1215,7 +1215,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (rmh->json_enc))); strlen (rmh->json_enc)));
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
rmh->job = GNUNET_CURL_job_add (ctx, rmh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,
@ -1533,7 +1533,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange,
struct TALER_TransferPublicKeyP transfer_pub; struct TALER_TransferPublicKeyP transfer_pub;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
MAH_handle_is_ready (exchange)); TEAH_handle_is_ready (exchange));
md = deserialize_melt_data (refresh_data, md = deserialize_melt_data (refresh_data,
refresh_data_length); refresh_data_length);
if (NULL == md) if (NULL == md)
@ -1627,7 +1627,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange,
rrh->reveal_cb = reveal_cb; rrh->reveal_cb = reveal_cb;
rrh->reveal_cb_cls = reveal_cb_cls; rrh->reveal_cb_cls = reveal_cb_cls;
rrh->md = md; rrh->md = md;
rrh->url = MAH_path_to_url (rrh->exchange, rrh->url = TEAH_path_to_url (rrh->exchange,
"/refresh/reveal"); "/refresh/reveal");
eh = TEL_curl_easy_get (rrh->url); eh = TEL_curl_easy_get (rrh->url);
@ -1643,7 +1643,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (rrh->json_enc))); strlen (rrh->json_enc)));
ctx = MAH_handle_to_context (rrh->exchange); ctx = TEAH_handle_to_context (rrh->exchange);
rrh->job = GNUNET_CURL_job_add (ctx, rrh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -387,7 +387,7 @@ TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange,
char *arg_str; char *arg_str;
if (GNUNET_YES != if (GNUNET_YES !=
MAH_handle_is_ready (exchange)) TEAH_handle_is_ready (exchange))
{ {
GNUNET_break (0); GNUNET_break (0);
return NULL; return NULL;
@ -407,12 +407,12 @@ TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange,
rlh->link_cb = link_cb; rlh->link_cb = link_cb;
rlh->link_cb_cls = link_cb_cls; rlh->link_cb_cls = link_cb_cls;
rlh->coin_priv = *coin_priv; rlh->coin_priv = *coin_priv;
rlh->url = MAH_path_to_url (exchange, arg_str); rlh->url = TEAH_path_to_url (exchange, arg_str);
GNUNET_free (arg_str); GNUNET_free (arg_str);
eh = TEL_curl_easy_get (rlh->url); eh = TEL_curl_easy_get (rlh->url);
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
rlh->job = GNUNET_CURL_job_add (ctx, rlh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -256,7 +256,7 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
struct TALER_MerchantSignatureP merchant_sig; struct TALER_MerchantSignatureP merchant_sig;
GNUNET_assert (GNUNET_YES == GNUNET_assert (GNUNET_YES ==
MAH_handle_is_ready (exchange)); TEAH_handle_is_ready (exchange));
rr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND); rr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND);
rr.purpose.size = htonl (sizeof (struct TALER_RefundRequestPS)); rr.purpose.size = htonl (sizeof (struct TALER_RefundRequestPS));
rr.h_contract_terms = *h_contract_terms; rr.h_contract_terms = *h_contract_terms;
@ -355,7 +355,7 @@ refund_obj = json_pack ("{s:o, s:o," /* amount/fee */
rh->exchange = exchange; rh->exchange = exchange;
rh->cb = cb; rh->cb = cb;
rh->cb_cls = cb_cls; rh->cb_cls = cb_cls;
rh->url = MAH_path_to_url (exchange, "/refund"); rh->url = TEAH_path_to_url (exchange, "/refund");
rh->depconf.purpose.size = htonl (sizeof (struct TALER_RefundConfirmationPS)); rh->depconf.purpose.size = htonl (sizeof (struct TALER_RefundConfirmationPS));
rh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND); rh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND);
rh->depconf.h_contract_terms = *h_contract_terms; rh->depconf.h_contract_terms = *h_contract_terms;
@ -383,7 +383,7 @@ refund_obj = json_pack ("{s:o, s:o," /* amount/fee */
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (rh->json_enc))); strlen (rh->json_enc)));
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
rh->job = GNUNET_CURL_job_add (ctx, rh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -607,7 +607,7 @@ TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange,
char *arg_str; char *arg_str;
if (GNUNET_YES != if (GNUNET_YES !=
MAH_handle_is_ready (exchange)) TEAH_handle_is_ready (exchange))
{ {
GNUNET_break (0); GNUNET_break (0);
return NULL; return NULL;
@ -623,12 +623,12 @@ TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange,
rsh->cb = cb; rsh->cb = cb;
rsh->cb_cls = cb_cls; rsh->cb_cls = cb_cls;
rsh->reserve_pub = *reserve_pub; rsh->reserve_pub = *reserve_pub;
rsh->url = MAH_path_to_url (exchange, rsh->url = TEAH_path_to_url (exchange,
arg_str); arg_str);
GNUNET_free (arg_str); GNUNET_free (arg_str);
eh = TEL_curl_easy_get (rsh->url); eh = TEL_curl_easy_get (rsh->url);
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
rsh->job = GNUNET_CURL_job_add (ctx, rsh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_NO, GNUNET_NO,
@ -1022,7 +1022,7 @@ reserve_withdraw_internal (struct TALER_EXCHANGE_Handle *exchange,
} }
wsh->ps = *ps; wsh->ps = *ps;
wsh->url = MAH_path_to_url (exchange, "/reserve/withdraw"); wsh->url = TEAH_path_to_url (exchange, "/reserve/withdraw");
eh = TEL_curl_easy_get (wsh->url); eh = TEL_curl_easy_get (wsh->url);
GNUNET_assert (NULL != (wsh->json_enc = GNUNET_assert (NULL != (wsh->json_enc =
@ -1037,7 +1037,7 @@ reserve_withdraw_internal (struct TALER_EXCHANGE_Handle *exchange,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (wsh->json_enc))); strlen (wsh->json_enc)));
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
wsh->job = GNUNET_CURL_job_add (ctx, wsh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -279,7 +279,7 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
CURL *eh; CURL *eh;
if (GNUNET_YES != if (GNUNET_YES !=
MAH_handle_is_ready (exchange)) TEAH_handle_is_ready (exchange))
{ {
GNUNET_break (0); GNUNET_break (0);
return NULL; return NULL;
@ -314,7 +314,7 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
dwh->exchange = exchange; dwh->exchange = exchange;
dwh->cb = cb; dwh->cb = cb;
dwh->cb_cls = cb_cls; dwh->cb_cls = cb_cls;
dwh->url = MAH_path_to_url (exchange, "/track/transaction"); dwh->url = TEAH_path_to_url (exchange, "/track/transaction");
dwh->depconf.purpose.size = htonl (sizeof (struct TALER_ConfirmWirePS)); dwh->depconf.purpose.size = htonl (sizeof (struct TALER_ConfirmWirePS));
dwh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE); dwh->depconf.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE);
dwh->depconf.h_wire = *h_wire; dwh->depconf.h_wire = *h_wire;
@ -334,7 +334,7 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE,
strlen (dwh->json_enc))); strlen (dwh->json_enc)));
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
dwh->job = GNUNET_CURL_job_add (ctx, dwh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -334,7 +334,7 @@ TALER_EXCHANGE_track_transfer (struct TALER_EXCHANGE_Handle *exchange,
CURL *eh; CURL *eh;
if (GNUNET_YES != if (GNUNET_YES !=
MAH_handle_is_ready (exchange)) TEAH_handle_is_ready (exchange))
{ {
GNUNET_break (0); GNUNET_break (0);
return NULL; return NULL;
@ -350,13 +350,13 @@ TALER_EXCHANGE_track_transfer (struct TALER_EXCHANGE_Handle *exchange,
GNUNET_asprintf (&path, GNUNET_asprintf (&path,
"/track/transfer?wtid=%s", "/track/transfer?wtid=%s",
buf); buf);
wdh->url = MAH_path_to_url (wdh->exchange, wdh->url = TEAH_path_to_url (wdh->exchange,
path); path);
GNUNET_free (buf); GNUNET_free (buf);
GNUNET_free (path); GNUNET_free (path);
eh = TEL_curl_easy_get (wdh->url); eh = TEL_curl_easy_get (wdh->url);
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
wdh->job = GNUNET_CURL_job_add (ctx, wdh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -397,7 +397,7 @@ TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange,
CURL *eh; CURL *eh;
if (GNUNET_YES != if (GNUNET_YES !=
MAH_handle_is_ready (exchange)) TEAH_handle_is_ready (exchange))
{ {
GNUNET_break (0); GNUNET_break (0);
return NULL; return NULL;
@ -406,10 +406,10 @@ TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange,
wh->exchange = exchange; wh->exchange = exchange;
wh->cb = wire_cb; wh->cb = wire_cb;
wh->cb_cls = wire_cb_cls; wh->cb_cls = wire_cb_cls;
wh->url = MAH_path_to_url (exchange, "/wire"); wh->url = TEAH_path_to_url (exchange, "/wire");
eh = TEL_curl_easy_get (wh->url); eh = TEL_curl_easy_get (wh->url);
ctx = MAH_handle_to_context (exchange); ctx = TEAH_handle_to_context (exchange);
wh->job = GNUNET_CURL_job_add (ctx, wh->job = GNUNET_CURL_job_add (ctx,
eh, eh,
GNUNET_YES, GNUNET_YES,

View File

@ -189,3 +189,17 @@ TALER_TESTING_cmd_is_batch (const struct TALER_TESTING_Command *cmd)
{ {
return cmd->run == &batch_run; return cmd->run == &batch_run;
} }
/**
* Obtain what command the batch is at.
*
* @return cmd current batch command
*/
struct TALER_TESTING_Command *
TALER_TESTING_cmd_batch_get_current (const struct TALER_TESTING_Command *cmd)
{
struct BatchState *bs = cmd->cls;
return &bs->batch[bs->batch_ip];
}

View File

@ -434,7 +434,7 @@ TALER_TESTING_cmd_withdraw_amount
} }
ws->expected_response_code = expected_response_code; ws->expected_response_code = expected_response_code;
ws->exchange = exchange; ws->exchange = exchange;
ws->exchange_url = MAH_path_to_url (exchange, "/"); ws->exchange_url = TEAH_path_to_url (exchange, "/");
cmd.cls = ws; cmd.cls = ws;
cmd.label = label; cmd.label = label;
@ -481,7 +481,7 @@ TALER_TESTING_cmd_withdraw_denomination
ws->pk = dk; ws->pk = dk;
ws->expected_response_code = expected_response_code; ws->expected_response_code = expected_response_code;
ws->exchange = exchange; ws->exchange = exchange;
ws->exchange_url = MAH_path_to_url (exchange, "/"); ws->exchange_url = TEAH_path_to_url (exchange, "/");
cmd.cls = ws; cmd.cls = ws;
cmd.label = label; cmd.label = label;

View File

@ -216,6 +216,13 @@ TALER_TESTING_interpreter_fail
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed at command `%s'\n", "Failed at command `%s'\n",
cmd->label); cmd->label);
while (TALER_TESTING_cmd_is_batch (cmd))
{
cmd = TALER_TESTING_cmd_batch_get_current (cmd);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Batch is at command `%s'\n",
cmd->label);
}
is->result = GNUNET_SYSERR; is->result = GNUNET_SYSERR;
GNUNET_SCHEDULER_shutdown (); GNUNET_SCHEDULER_shutdown ();
} }

View File

@ -1452,6 +1452,15 @@ int
TALER_TESTING_cmd_is_batch (const struct TALER_TESTING_Command *cmd); TALER_TESTING_cmd_is_batch (const struct TALER_TESTING_Command *cmd);
/**
* Obtain what command the batch is at.
*
* @return cmd current batch command
*/
struct TALER_TESTING_Command *
TALER_TESTING_cmd_batch_get_current (const struct TALER_TESTING_Command *cmd);
/* *** Generic trait logic for implementing traits ********* */ /* *** Generic trait logic for implementing traits ********* */
/** /**