[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: -test exchange and payto uri as
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: -test exchange and payto uri as well |
Date: |
Mon, 11 Jul 2022 18:31:53 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 960dcacf -test exchange and payto uri as well
960dcacf is described below
commit 960dcacf25e51cc2bff359ea1fc86cdd3d9e6083
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jul 11 18:31:51 2022 +0200
-test exchange and payto uri as well
---
src/backenddb/test_merchantdb.c | 24 ++++++++++++++++++++----
src/testing/testing_api_cmd_wallet_get_tip.c | 3 ---
2 files changed, 20 insertions(+), 7 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);
diff --git a/src/testing/testing_api_cmd_wallet_get_tip.c
b/src/testing/testing_api_cmd_wallet_get_tip.c
index f7786973..0c19a5b9 100644
--- a/src/testing/testing_api_cmd_wallet_get_tip.c
+++ b/src/testing/testing_api_cmd_wallet_get_tip.c
@@ -89,7 +89,6 @@ wallet_tip_get_cb (void *cls,
const char *exchange_url,
const struct TALER_Amount *amount_remaining)
{
- /* FIXME, deeper checks should be implemented here. */
struct WalletTipGetState *gts = cls;
const struct TALER_TESTING_Command *tip_cmd;
@@ -111,8 +110,6 @@ wallet_tip_get_cb (void *cls,
switch (hr->http_status)
{
case MHD_HTTP_OK:
- // FIXME: use gts->tip_reference here to
- // check if the data returned matches that from the POST / PATCH
if (gts->cmp_amounts)
{
if ((GNUNET_OK != TALER_amount_cmp_currency (>s->amount_remaining,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: -test exchange and payto uri as well,
gnunet <=