summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-06 10:20:58 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-06 10:20:58 +0200
commitcaf6807856e3044f7e1065d84ca189e4d89b3b12 (patch)
treeef450f7eee7a4496becfd1ecd2cc4221fa8bc686 /src/testing
parentc71c40d4d62d55730dad032c3ef9f8f645a07efd (diff)
downloadexchange-caf6807856e3044f7e1065d84ca189e4d89b3b12.tar.gz
exchange-caf6807856e3044f7e1065d84ca189e4d89b3b12.tar.bz2
exchange-caf6807856e3044f7e1065d84ca189e4d89b3b12.zip
-fix assertion failure caused by testcase
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_insert_deposit.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c
index 607baeef3..b614702a3 100644
--- a/src/testing/testing_api_cmd_insert_deposit.c
+++ b/src/testing/testing_api_cmd_insert_deposit.c
@@ -81,8 +81,27 @@ struct InsertDepositState
static void
fake_issue (struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue)
{
- memset (issue, 0, sizeof (struct
- TALER_EXCHANGEDB_DenominationKeyInformationP));
+ struct GNUNET_TIME_Absolute now;
+
+ memset (issue,
+ 0,
+ sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP));
+ now = GNUNET_TIME_absolute_get ();
+ (void) GNUNET_TIME_round_abs (&now);
+ issue->properties.start
+ = GNUNET_TIME_absolute_hton (now);
+ issue->properties.expire_withdraw
+ = GNUNET_TIME_absolute_hton (
+ GNUNET_TIME_absolute_add (now,
+ GNUNET_TIME_UNIT_MINUTES));
+ issue->properties.expire_deposit
+ = GNUNET_TIME_absolute_hton (
+ GNUNET_TIME_absolute_add (now,
+ GNUNET_TIME_UNIT_HOURS));
+ issue->properties.expire_legal
+ = GNUNET_TIME_absolute_hton (
+ GNUNET_TIME_absolute_add (now,
+ GNUNET_TIME_UNIT_DAYS));
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount_nbo ("EUR:1",
&issue->properties.value));