final fixes to make test pass

This commit is contained in:
Christian Grothoff 2015-07-05 17:27:20 +02:00
parent 0372b7583b
commit b8c264656c
5 changed files with 10 additions and 9 deletions

View File

@ -29,6 +29,9 @@ libtalermint_la_LIBADD = \
check_PROGRAMS = \ check_PROGRAMS = \
test_mint_api test_mint_api
TESTS = \
$(check_PROGRAMS)
test_mint_api_SOURCES = \ test_mint_api_SOURCES = \
test_mint_api.c test_mint_api.c
test_mint_api_LDADD = \ test_mint_api_LDADD = \

View File

@ -677,10 +677,6 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint,
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_URL, CURLOPT_URL,
dh->url)); dh->url));
GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh,
CURLOPT_VERBOSE,
1LL));
GNUNET_assert (CURLE_OK == GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh, curl_easy_setopt (eh,
CURLOPT_POSTFIELDS, CURLOPT_POSTFIELDS,

View File

@ -1045,7 +1045,7 @@ main (int argc,
"-d", "test-mint-home", "-d", "test-mint-home",
NULL); NULL);
/* give child time to start and bind against the socket */ /* give child time to start and bind against the socket */
sleep (5); sleep (2);
result = GNUNET_SYSERR; result = GNUNET_SYSERR;
GNUNET_SCHEDULER_run (&run, NULL); GNUNET_SCHEDULER_run (&run, NULL);
GNUNET_OS_process_kill (mintd, GNUNET_OS_process_kill (mintd,

View File

@ -386,10 +386,12 @@ reload_keys_sign_iter (void *cls,
/* The signkey is valid at this time, check if it's more recent than /* The signkey is valid at this time, check if it's more recent than
what we have so far! */ what we have so far! */
if (GNUNET_TIME_absolute_ntoh (ctx->current_sign_key_issue.issue.start).abs_value_us < if ( (GNUNET_TIME_absolute_ntoh (ctx->current_sign_key_issue.issue.start).abs_value_us <
GNUNET_TIME_absolute_ntoh (ski->issue.start).abs_value_us) GNUNET_TIME_absolute_ntoh (ski->issue.start).abs_value_us) &&
(GNUNET_TIME_absolute_ntoh (ski->issue.start).abs_value_us <
now.abs_value_us) )
{ {
/* We keep the most recent one around */ /* We use the most recent one, if it is valid now (not just in the near future) */
ctx->current_sign_key_issue = *ski; ctx->current_sign_key_issue = *ski;
} }
json_array_append_new (ctx->sign_keys_array, json_array_append_new (ctx->sign_keys_array,

View File

@ -367,7 +367,7 @@ TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection,
&sig); &sig);
return TMH_RESPONSE_reply_json_pack (connection, return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK, MHD_HTTP_OK,
"{s:s, s:o}", "{s:s, s:o, s:o}",
"status", "DEPOSIT_OK", "status", "DEPOSIT_OK",
"sig", TALER_json_from_data (&sig, "sig", TALER_json_from_data (&sig,
sizeof (sig)), sizeof (sig)),