diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-11-04 19:58:28 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-11-05 10:38:39 +0100 |
commit | 9c39c3c13dd0d9ff104173efbc8217722271a508 (patch) | |
tree | 78722e5392b15486062185e1f4d209d959c22cb3 | |
parent | d855a410f5ecb7b39d200f07e83253374660b5f5 (diff) |
-fix test FTBFS
-rw-r--r-- | src/backenddb/test_merchantdb.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c index 36464121..f9943754 100644 --- a/src/backenddb/test_merchantdb.c +++ b/src/backenddb/test_merchantdb.c @@ -107,8 +107,8 @@ make_instance (const char *instance_id, GNUNET_CRYPTO_eddsa_key_create (&instance->merchant_priv.eddsa_priv); GNUNET_CRYPTO_eddsa_key_get_public (&instance->merchant_priv.eddsa_priv, &instance->merchant_pub.eddsa_pub); - instance->instance.id = instance_id; - instance->instance.name = "Test"; + instance->instance.id = (char *) instance_id; + instance->instance.name = (char *) "Test"; instance->instance.address = json_array (); GNUNET_assert (NULL != instance->instance.address); GNUNET_assert (0 == json_array_append_new (instance->instance.address, @@ -153,7 +153,8 @@ make_account (struct TALER_MERCHANTDB_AccountDetails *account) GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG, &account->salt, sizeof (account->salt)); - account->payto_uri = "payto://x-taler-bank/bank.demo.taler.net/4"; + account->payto_uri.full_payto + = (char *) "payto://x-taler-bank/bank.demo.taler.net/4"; account->active = true; } @@ -236,6 +237,7 @@ check_instances_equal (const struct TALER_MERCHANTDB_InstanceSettings *a, } +#if 0 /** * Compares two accounts for equality. * @@ -251,25 +253,15 @@ check_accounts_equal (const struct TALER_MERCHANTDB_AccountDetails *a, &b->h_wire)) || (0 != GNUNET_memcmp (&a->salt, &b->salt)) || - (0 != strcmp (a->payto_uri, - b->payto_uri)) || + (0 != TALER_full_payto_cmp (a->payto_uri, + b->payto_uri)) || (a->active != b->active)) return 1; return 0; } -// FIXME: use this! -void -lookup_accounts_cb (void *cls, - const struct TALER_MERCHANTDB_AccountDetails *account) -{ - const struct TALER_MERCHANTDB_AccountDetails *want = cls; - - GNUNET_assert (0 == - check_accounts_equal (want, - account)); -} +#endif /** @@ -633,7 +625,9 @@ run_test_instances (struct TestInstances_Closure *cls) if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != plugin->lookup_account (plugin->cls, cls->instances[0].instance.id, - "payto://other-uri", + (struct TALER_FullPayto) { + (char *) "payto://other-uri" + }, &account_serial)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -4078,7 +4072,7 @@ static void lookup_transfers_cb (void *cls, const struct TALER_Amount *credit_amount, const struct TALER_WireTransferIdentifierRawP *wtid, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *exchange_url, uint64_t transfer_serial_id, struct GNUNET_TIME_Timestamp execution_time, @@ -5581,7 +5575,7 @@ static void kyc_status_ok ( void *cls, const struct TALER_MerchantWireHashP *h_wire, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *exchange_url, struct GNUNET_TIME_Timestamp last_check, bool kyc_ok, @@ -5602,7 +5596,7 @@ static void kyc_status_fail ( void *cls, const struct TALER_MerchantWireHashP *h_wire, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *exchange_url, struct GNUNET_TIME_Timestamp last_check, bool kyc_ok, |