aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-05 17:27:20 +0200
committerChristian Grothoff <christian@grothoff.org>2015-07-05 17:27:20 +0200
commitb8c264656cb387f90697885767c5c47216a51816 (patch)
tree2cdf778cb6e92cda7e2c716666d423ce9d475bcc
parent0372b7583b530cd9cd9c5b65f8a2de98135cdc1e (diff)
final fixes to make test pass
-rw-r--r--src/mint-lib/Makefile.am3
-rw-r--r--src/mint-lib/mint_api_deposit.c4
-rw-r--r--src/mint-lib/test_mint_api.c2
-rw-r--r--src/mint/taler-mint-httpd_keystate.c8
-rw-r--r--src/mint/taler-mint-httpd_responses.c2
5 files changed, 10 insertions, 9 deletions
diff --git a/src/mint-lib/Makefile.am b/src/mint-lib/Makefile.am
index edd26a025..e3a26be03 100644
--- a/src/mint-lib/Makefile.am
+++ b/src/mint-lib/Makefile.am
@@ -29,6 +29,9 @@ libtalermint_la_LIBADD = \
check_PROGRAMS = \
test_mint_api
+TESTS = \
+ $(check_PROGRAMS)
+
test_mint_api_SOURCES = \
test_mint_api.c
test_mint_api_LDADD = \
diff --git a/src/mint-lib/mint_api_deposit.c b/src/mint-lib/mint_api_deposit.c
index c6258033c..589860c46 100644
--- a/src/mint-lib/mint_api_deposit.c
+++ b/src/mint-lib/mint_api_deposit.c
@@ -679,10 +679,6 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint,
dh->url));
GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh,
- CURLOPT_VERBOSE,
- 1LL));
- GNUNET_assert (CURLE_OK ==
- curl_easy_setopt (eh,
CURLOPT_POSTFIELDS,
dh->json_enc));
GNUNET_assert (CURLE_OK ==
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c
index 58f502bae..0fe1ad427 100644
--- a/src/mint-lib/test_mint_api.c
+++ b/src/mint-lib/test_mint_api.c
@@ -1045,7 +1045,7 @@ main (int argc,
"-d", "test-mint-home",
NULL);
/* give child time to start and bind against the socket */
- sleep (5);
+ sleep (2);
result = GNUNET_SYSERR;
GNUNET_SCHEDULER_run (&run, NULL);
GNUNET_OS_process_kill (mintd,
diff --git a/src/mint/taler-mint-httpd_keystate.c b/src/mint/taler-mint-httpd_keystate.c
index dea898587..d7b64b831 100644
--- a/src/mint/taler-mint-httpd_keystate.c
+++ b/src/mint/taler-mint-httpd_keystate.c
@@ -386,10 +386,12 @@ reload_keys_sign_iter (void *cls,
/* The signkey is valid at this time, check if it's more recent than
what we have so far! */
- 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)
+ 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 <
+ 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;
}
json_array_append_new (ctx->sign_keys_array,
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c
index fdb5137ec..b5e3ea5c2 100644
--- a/src/mint/taler-mint-httpd_responses.c
+++ b/src/mint/taler-mint-httpd_responses.c
@@ -367,7 +367,7 @@ TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection,
&sig);
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
- "{s:s, s:o}",
+ "{s:s, s:o, s:o}",
"status", "DEPOSIT_OK",
"sig", TALER_json_from_data (&sig,
sizeof (sig)),