commit 74b5379e068925762bcab2a9b5f9e2fcb1939727
parent cc864d68b9f90466021ce8ef91961a64e16eb2fb
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 13 Apr 2026 21:26:34 +0200
fix integrationtest
Diffstat:
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/lib/donau_api_handle.c b/src/lib/donau_api_handle.c
@@ -648,10 +648,19 @@ DONAU_select_donation_unit_keys_for_amount (
= &keys->donation_unit_keys[j];
if (du->lost)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Donation unit lost!\n");
continue;
+ }
if (du->year != year)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Donation unit for year %u, want %u!\n",
+ (unsigned int) du->year,
+ (unsigned int) year);
continue;
-
+ }
GNUNET_array_grow (duv,
n_duv,
n_duv + 1);
@@ -661,6 +670,8 @@ DONAU_select_donation_unit_keys_for_amount (
if (0 == n_duv)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "No eligible (non-lost, correct year) donation units found\n");
*out_keys = NULL;
*out_len = 0;
return GNUNET_NO;
diff --git a/src/testing/test_donau_api.c b/src/testing/test_donau_api.c
@@ -97,17 +97,17 @@ run (void *cls,
TALER_TESTING_cmd_issue_receipts ("issue-receipts",
"patch-charity",
uses_cs,
- 2025,
+ GNUNET_TIME_get_current_year (),
"7560001010000", // tax id
"1234", // salt for tax id hash
"EUR:5", /* Amount to be issued*/
MHD_HTTP_OK),
TALER_TESTING_cmd_submit_receipts ("submit-receipts",
"issue-receipts", // cmd trait reference
- 2025,
+ GNUNET_TIME_get_current_year (),
MHD_HTTP_CREATED),
TALER_TESTING_cmd_donation_statement_get ("donation-statement",
- 2025,
+ GNUNET_TIME_get_current_year (),
MHD_HTTP_OK),
TALER_TESTING_cmd_charity_delete ("delete-charity",
"patch-charity", // cmd trait reference
diff --git a/src/testing/testing_api_cmd_issue_receipts.c b/src/testing/testing_api_cmd_issue_receipts.c
@@ -411,7 +411,9 @@ status_run (void *cls,
if ((GNUNET_NO == sret) || (0 == ss->num_bkp))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Could not compose exact amount from donation units\n");
+ "Could not compose exact amount %s from donation units for %u\n",
+ TALER_amount2s (&ss->amount),
+ (unsigned int) ss->year);
TALER_TESTING_interpreter_fail (is);
return;
}