summaryrefslogtreecommitdiff
path: root/src/backenddb/test_merchantdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backenddb/test_merchantdb.c')
-rw-r--r--src/backenddb/test_merchantdb.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index e5eb8890..1bfaac61 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -2483,7 +2483,7 @@ make_deposit (const struct InstanceData *instance,
GNUNET_CRYPTO_eddsa_key_create (&coin_priv.eddsa_priv);
GNUNET_CRYPTO_eddsa_key_get_public (&coin_priv.eddsa_priv,
&deposit->coin_pub.eddsa_pub);
- deposit->exchange_url = "test-exchange";
+ deposit->exchange_url = "https://test-exchange/";
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount ("EUR:50.00",
&deposit->amount_with_fee));
@@ -4528,6 +4528,7 @@ lookup_reserve_cb (void *cls,
{
struct TestLookupReserve_Closure *cmp = cls;
unsigned int tip_cmp_results[tips_length];
+
if (NULL == cmp)
return;
if (GNUNET_TIME_timestamp_cmp (cmp->reserve_to_cmp->expiration,
@@ -4544,8 +4545,23 @@ lookup_reserve_cb (void *cls,
cmp->result_matches = 1;
return;
}
- /* FIXME: What about ‘exchange_url’ and ‘payto_uri’? --ttn */
- memset (tip_cmp_results, 0, sizeof (unsigned int) * tips_length);
+ if (0 != strcmp (exchange_url,
+ "https://exch-url/"))
+ {
+ GNUNET_break (0);
+ cmp->result_matches = 0;
+ return;
+ }
+ if (0 != strcmp (payto_uri,
+ "payto://other-uri"))
+ {
+ GNUNET_break (0);
+ cmp->result_matches = 0;
+ return;
+ }
+ memset (tip_cmp_results,
+ 0,
+ sizeof (tip_cmp_results));
for (unsigned int i = 0; tips_length > i; ++i)
{
for (unsigned int j = 0; tips_length > j; ++j)
@@ -5377,7 +5393,7 @@ pre_test_tips (struct TestTips_Closure *cls)
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount ("EUR:99.99",
&cls->reserve.initial_amount));
- cls->reserve.exchange_url = "exch-url";
+ cls->reserve.exchange_url = "https://exch-url/";
cls->reserve.payto_uri = "payto://other-uri";
cls->reserve.expiration = GNUNET_TIME_relative_to_timestamp (
GNUNET_TIME_UNIT_WEEKS);