[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 04/08: fix misc issues with tests after la
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 04/08: fix misc issues with tests after latest refactoring |
Date: |
Sun, 15 Apr 2018 12:26:21 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit 84036f0dd4eb52936c8778165d0e15c8131eb976
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Apr 2 16:59:54 2018 +0200
fix misc issues with tests after latest refactoring
---
src/backend/taler-merchant-httpd_track-transfer.c | 4 ++-
src/backenddb/test_merchantdb.c | 4 +--
src/lib/test_merchant_api.c | 14 ++++----
src/lib/test_merchant_api_new.c | 39 ++++++++++++----------
src/lib/testing_api_cmd_track.c | 6 ++--
.../taler-merchant-generate-payments.c | 1 -
6 files changed, 37 insertions(+), 31 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_track-transfer.c
b/src/backend/taler-merchant-httpd_track-transfer.c
index 4ce2e59..108d39a 100644
--- a/src/backend/taler-merchant-httpd_track-transfer.c
+++ b/src/backend/taler-merchant-httpd_track-transfer.c
@@ -946,6 +946,8 @@ MH_handler_track_transfer (struct TMH_RequestHandler *rh,
"exchange");
rctx->url = GNUNET_strdup (url);
+ /* FIXME: change again: we probably don't want the wire_method
+ but rather the _account_ (section) here! */
wire_method = MHD_lookup_connection_value (connection,
MHD_GET_ARGUMENT_KIND,
"wire_method");
@@ -955,7 +957,7 @@ MH_handler_track_transfer (struct TMH_RequestHandler *rh,
{
/* temporary work-around until demo is adjusted... */
GNUNET_break (0);
- wire_method = "test";
+ wire_method = "x-taler-bank";
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Client needs fixing, see API change for #4943!\n");
}
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index 33a05dd..36d9f75 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -807,12 +807,12 @@ run (void *cls)
deposit_proof = json_object ();
GNUNET_assert (0 ==
json_object_set_new (deposit_proof,
- "test",
+ "x-taler-bank",
json_string ("backenddb test A")));
transfer_proof = json_object ();
GNUNET_assert (0 ==
json_object_set_new (transfer_proof,
- "test",
+ "x-taler-bank",
json_string ("backenddb test B")));
contract = json_object ();
contract_terms = json_object ();
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index b8a8e36..e255666 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -1072,7 +1072,7 @@ get_instance_priv (struct GNUNET_CONFIGURATION_Handle
*config,
struct GNUNET_CRYPTO_EddsaPrivateKey *ret;
(void) GNUNET_asprintf (&config_section,
- "merchant-instance-%s",
+ "instance-%s",
instance);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (config,
@@ -3159,13 +3159,13 @@ interpreter_run (void *cls)
struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
GNUNET_asprintf (§ion,
- "merchant-instance-%s",
+ "instance-%s",
cmd->details.admin_add_incoming.instance);
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg,
- section,
-
"TIP_RESERVE_PRIV_FILENAME",
- &keys))
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ section,
+
"TIP_RESERVE_PRIV_FILENAME",
+ &keys))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Configuration fails to specify reserve private key
filename in section %s\n",
@@ -3806,7 +3806,7 @@ interpreter_run (void *cls)
= TALER_MERCHANT_track_transfer (ctx,
MERCHANT_URL,
instance,
- "test",
+ "x-taler-bank",
&wtid,
EXCHANGE_URL,
&track_transfer_cb,
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
index de1dc09..3021ba9 100644
--- a/src/lib/test_merchant_api_new.c
+++ b/src/lib/test_merchant_api_new.c
@@ -52,8 +52,7 @@
static const char *pickup_amounts_1[] = {"EUR:5", NULL};
/**
- * URL of the fakebank. Obtained from CONFIG_FILE's
- * "exchange-wire-test:BANK_URI" option.
+ * URL of the fakebank.
*/
static char *fakebank_url;
@@ -83,6 +82,11 @@ static char *exchange_url;
#define USER_ACCOUNT_NO 62
/**
+ * Account number used by the merchant
+ */
+#define MERCHANT_ACCOUNT_NO 3
+
+/**
* User name. Never checked by fakebank.
*/
#define USER_LOGIN_NAME "user42"
@@ -304,18 +308,18 @@ run (void *cls,
TALER_TESTING_cmd_fakebank_transfer ("create-reserve-2",
"EUR:1",
fakebank_url,
- 63, 2,
- "user63",
- "pass63",
+ USER_ACCOUNT_NO, EXCHANGE_ACCOUNT_NO,
+ "user62",
+ "pass62",
EXCHANGE_URL),
TALER_TESTING_cmd_fakebank_transfer_with_ref
("create-reserve-2b",
"EUR:4.01",
fakebank_url,
- 63, 2,
- "user63",
- "pass63",
+ USER_ACCOUNT_NO, EXCHANGE_ACCOUNT_NO,
+ "user62",
+ "pass62",
"create-reserve-2",
EXCHANGE_URL),
CMD_EXEC_WIREWATCH ("wirewatch-2"),
@@ -323,12 +327,12 @@ run (void *cls,
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-2",
EXCHANGE_URL,
- "EUR:1", 63, 2),
+ "EUR:1", USER_ACCOUNT_NO, EXCHANGE_ACCOUNT_NO),
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-2",
EXCHANGE_URL,
- "EUR:4.01", 63, 2),
+ "EUR:4.01", USER_ACCOUNT_NO, EXCHANGE_ACCOUNT_NO),
TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-2",
is->exchange,
@@ -346,12 +350,12 @@ run (void *cls,
TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-1"),
CMD_EXEC_AGGREGATOR ("run-aggregator"),
-
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-498c",
EXCHANGE_URL,
- "EUR:4.98", 2, 62),
-
+ "EUR:4.98",
+ EXCHANGE_ACCOUNT_NO,
+ MERCHANT_ACCOUNT_NO),
TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-2"),
TALER_TESTING_cmd_merchant_track_transaction
@@ -390,13 +394,12 @@ run (void *cls,
"EUR:0.01"),
CMD_EXEC_AGGREGATOR ("run-aggregator-2"),
-
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-498c-2",
EXCHANGE_URL,
"EUR:4.98",
EXCHANGE_ACCOUNT_NO,
- USER_ACCOUNT_NO),
+ MERCHANT_ACCOUNT_NO),
TALER_TESTING_cmd_check_bank_empty ("check_bank_empty"),
@@ -633,9 +636,11 @@ run (void *cls,
TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-tip-498c",
EXCHANGE_URL,
- "EUR:4.98", EXCHANGE_ACCOUNT_NO, USER_ACCOUNT_NO),
+ "EUR:4.98",
+ EXCHANGE_ACCOUNT_NO,
+ USER_ACCOUNT_NO),
TALER_TESTING_cmd_check_bank_empty
- ("check_bank_empty-at-tips"),
+ ("check_bank_empty-at-tips"),
/* pay again logic. */
TALER_TESTING_cmd_fakebank_transfer
diff --git a/src/lib/testing_api_cmd_track.c b/src/lib/testing_api_cmd_track.c
index f3d6338..afcaf83 100644
--- a/src/lib/testing_api_cmd_track.c
+++ b/src/lib/testing_api_cmd_track.c
@@ -199,12 +199,12 @@ track_transfer_run (void *cls,
tts->tth = TALER_MERCHANT_track_transfer (tts->ctx,
tts->merchant_url,
"default",
- "test",
+ "x-taler-bank",
wtid,
exchange_url,
&track_transfer_cb,
tts);
- GNUNET_assert (NULL != tts->tth);
+ GNUNET_assert (NULL != tts->tth);
}
/**
@@ -244,7 +244,7 @@ track_transaction_run (void *cls,
order_id,
&track_transaction_cb,
tts);
-
+
GNUNET_assert (NULL != tts->tth);
}
diff --git a/src/merchant-tools/taler-merchant-generate-payments.c
b/src/merchant-tools/taler-merchant-generate-payments.c
index 7d40473..33716b9 100644
--- a/src/merchant-tools/taler-merchant-generate-payments.c
+++ b/src/merchant-tools/taler-merchant-generate-payments.c
@@ -1399,7 +1399,6 @@ interpreter_run (void *cls)
"taler-exchange-wirewatch",
"taler-exchange-wirewatch",
"-c", cfgfilename,
- "-t", "test", /* use Taler's bank/fakebank
*/
"-T", /* exit when done */
NULL);
if (NULL == cmd->details.run_wirewatch.wirewatch_proc)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-merchant] branch master updated (d880b37 -> c2e039b), gnunet, 2018/04/15
- [GNUnet-SVN] [taler-merchant] 07/08: update manual, gnunet, 2018/04/15
- [GNUnet-SVN] [taler-merchant] 08/08: fix possible test errors in configure.ac, gnunet, 2018/04/15
- [GNUnet-SVN] [taler-merchant] 04/08: fix misc issues with tests after latest refactoring,
gnunet <=
- [GNUnet-SVN] [taler-merchant] 01/08: pre-merge changes towards #4939 patch, gnunet, 2018/04/15
- [GNUnet-SVN] [taler-merchant] 05/08: get tests to pass (again), gnunet, 2018/04/15
- [GNUnet-SVN] [taler-merchant] 06/08: update manual to reflect current options, gnunet, 2018/04/15
- [GNUnet-SVN] [taler-merchant] 03/08: fix more of config files, fix testing_api_helpers logic to deal with merchant ports that are not 8082, gnunet, 2018/04/15
- [GNUnet-SVN] [taler-merchant] 02/08: Towards enabling multiple wire accounts per merchant., gnunet, 2018/04/15