aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-11-03 08:25:48 +0100
committerChristian Grothoff <christian@grothoff.org>2024-11-05 10:37:38 +0100
commit3f31dd425fad784008f59e0e76e10fbae378f1ce (patch)
treee0d38d92a84b2dc9966bff663d94cfd6318932c4
parent29706047056038f153c7d62d8d3257b194a0dfc7 (diff)
more work on testing
-rw-r--r--src/include/taler_testing_lib.h5
-rw-r--r--src/testing/test_exchange_management_api.c14
-rw-r--r--src/testing/test_exchange_p2p.c10
-rw-r--r--src/testing/test_taler_exchange_aggregator.c18
-rw-r--r--src/testing/testing_api_misc.c5
5 files changed, 32 insertions, 20 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index b95c9bb7d..8bd793120 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -164,6 +164,11 @@ struct TALER_TESTING_Credentials
* RFC 8905 URI of a user.
*/
struct TALER_FullPayto user43_payto;
+
+ /**
+ * RFC 8905 URI of a user.
+ */
+ struct TALER_FullPayto user44_payto;
};
diff --git a/src/testing/test_exchange_management_api.c b/src/testing/test_exchange_management_api.c
index 7cce61b55..98a375ca0 100644
--- a/src/testing/test_exchange_management_api.c
+++ b/src/testing/test_exchange_management_api.c
@@ -117,31 +117,31 @@ run (void *cls,
MHD_HTTP_NO_CONTENT,
false),
TALER_TESTING_cmd_wire_add ("add-wire-account",
- "payto://x-taler-bank/localhost/42?receiver-name=42",
+ cred.user42_payto,
MHD_HTTP_NO_CONTENT,
false),
TALER_TESTING_cmd_wire_add ("add-wire-account-idempotent",
- "payto://x-taler-bank/localhost/42?receiver-name=42",
+ cred.user42_payto,
MHD_HTTP_NO_CONTENT,
false),
TALER_TESTING_cmd_wire_add ("add-wire-account-another",
- "payto://x-taler-bank/localhost/43?receiver-name=43",
+ cred.user43_payto,
MHD_HTTP_NO_CONTENT,
false),
TALER_TESTING_cmd_wire_add ("add-wire-account-bad-signature",
- "payto://x-taler-bank/localhost/44?receiver-name=44",
+ cred.user44_payto,
MHD_HTTP_FORBIDDEN,
true),
TALER_TESTING_cmd_wire_del ("del-wire-account-not-found",
- "payto://x-taler-bank/localhost/44?receiver-name=44",
+ cred.user44_payto,
MHD_HTTP_NOT_FOUND,
false),
TALER_TESTING_cmd_wire_del ("del-wire-account-bad-signature",
- "payto://x-taler-bank/localhost/43?receiver-name=43",
+ cred.user43_payto,
MHD_HTTP_FORBIDDEN,
true),
TALER_TESTING_cmd_wire_del ("del-wire-account-ok",
- "payto://x-taler-bank/localhost/43?receiver-name=43",
+ cred.user43_payto,
MHD_HTTP_NO_CONTENT,
false),
TALER_TESTING_cmd_exec_offline_sign_keys ("download-future-keys",
diff --git a/src/testing/test_exchange_p2p.c b/src/testing/test_exchange_p2p.c
index 821f37272..b2d06b3ef 100644
--- a/src/testing/test_exchange_p2p.c
+++ b/src/testing/test_exchange_p2p.c
@@ -484,14 +484,14 @@ run (void *cls,
TALER_TESTING_cmd_reserve_close (
"reserve-101-close-kyc",
"create-reserve-101",
- /* 42b => not to origin */
- "payto://x-taler-bank/localhost/42b?receiver-name=42b",
+ /* 44 => not to origin */
+ cred.user44_payto,
MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS),
TALER_TESTING_cmd_admin_add_kycauth (
"setup-account-key",
"EUR:0.01",
&cred.ba,
- "payto://x-taler-bank/localhost/42b?receiver-name=42b",
+ cred.user44_payto,
NULL /* create new key */),
CMD_EXEC_WIREWATCH (
"import-kyc-account"),
@@ -526,8 +526,8 @@ run (void *cls,
TALER_TESTING_cmd_reserve_close (
"reserve-101-close",
"create-reserve-101",
- /* 42b => not to origin */
- "payto://x-taler-bank/localhost/42b?receiver-name=42b",
+ /* 44 => not to origin */
+ cred.user44_payto,
MHD_HTTP_OK),
TALER_TESTING_cmd_exec_closer (
"close-reserves-101",
diff --git a/src/testing/test_taler_exchange_aggregator.c b/src/testing/test_taler_exchange_aggregator.c
index 2d7acc6dc..b9b1fe2ec 100644
--- a/src/testing/test_taler_exchange_aggregator.c
+++ b/src/testing/test_taler_exchange_aggregator.c
@@ -41,6 +41,8 @@ struct TALER_TESTING_Credentials cred;
static char *config_filename;
#define USER42_ACCOUNT "42"
+#define USER43_ACCOUNT "43"
+#define USER44_ACCOUNT "44"
/**
@@ -51,8 +53,8 @@ static char *config_filename;
* @param cfg_fn configuration file to use
*/
#define CMD_EXEC_AGGREGATOR(label, cfg_fn) \
- TALER_TESTING_cmd_exec_aggregator (label "-aggregator", cfg_fn), \
- TALER_TESTING_cmd_exec_transfer (label "-transfer", cfg_fn)
+ TALER_TESTING_cmd_exec_aggregator (label "-aggregator", cfg_fn), \
+ TALER_TESTING_cmd_exec_transfer (label "-transfer", cfg_fn)
/**
@@ -127,7 +129,7 @@ run (void *cls,
TALER_TESTING_cmd_insert_deposit ("do-deposit-3a",
cred.cfg,
"bob",
- "4",
+ USER43_ACCOUNT,
GNUNET_TIME_timestamp_get (),
GNUNET_TIME_UNIT_ZERO,
"EUR:1",
@@ -135,7 +137,7 @@ run (void *cls,
TALER_TESTING_cmd_insert_deposit ("do-deposit-3b",
cred.cfg,
"bob",
- "5",
+ USER44_ACCOUNT,
GNUNET_TIME_timestamp_get (),
GNUNET_TIME_UNIT_ZERO,
"EUR:1",
@@ -143,7 +145,7 @@ run (void *cls,
TALER_TESTING_cmd_insert_deposit ("do-deposit-3c",
cred.cfg,
"alice",
- "4",
+ USER43_ACCOUNT,
GNUNET_TIME_timestamp_get (),
GNUNET_TIME_UNIT_ZERO,
"EUR:1",
@@ -155,17 +157,17 @@ run (void *cls,
cred.exchange_url,
"EUR:0.89",
cred.exchange_payto,
- "payto://x-taler-bank/localhost/4?receiver-name=4"),
+ cred.user43_payto),
TALER_TESTING_cmd_check_bank_transfer ("expect-deposit-3b",
cred.exchange_url,
"EUR:0.89",
cred.exchange_payto,
- "payto://x-taler-bank/localhost/4?receiver-name=4"),
+ cred.user43_payto),
TALER_TESTING_cmd_check_bank_transfer ("expect-deposit-3c",
cred.exchange_url,
"EUR:0.89",
cred.exchange_payto,
- "payto://x-taler-bank/localhost/5?receiver-name=5"),
+ cred.user44_payto),
TALER_TESTING_cmd_check_bank_empty ("expect-empty-transactions-after-3"),
/* checking that aggregator waits for the deadline. */
diff --git a/src/testing/testing_api_misc.c b/src/testing/testing_api_misc.c
index 7cea29f1a..b8e380df0 100644
--- a/src/testing/testing_api_misc.c
+++ b/src/testing/testing_api_misc.c
@@ -168,6 +168,8 @@ TALER_TESTING_get_credentials (
= GNUNET_strdup ("payto://x-taler-bank/localhost/42?receiver-name=42");
ua->user43_payto.full_payto
= GNUNET_strdup ("payto://x-taler-bank/localhost/43?receiver-name=43");
+ ua->user44_payto.full_payto
+ = GNUNET_strdup ("payto://x-taler-bank/localhost/44?receiver-name=44");
break;
case TALER_TESTING_BS_IBAN:
ua->exchange_payto
@@ -178,6 +180,9 @@ TALER_TESTING_get_credentials (
ua->user43_payto.full_payto
= GNUNET_strdup (
"payto://iban/SANDBOXX/GB33BUKB20201555555555?receiver-name=User43");
+ ua->user44_payto.full_payto
+ = GNUNET_strdup (
+ "payto://iban/SANDBOXX/NL05RABO5361965189?receiver-name=User44");
break;
}
return GNUNET_OK;