summaryrefslogtreecommitdiff
path: root/src/bank-lib/test_bank_api.c
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-05-09 17:35:07 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-05-10 15:50:41 +0200
commit75f47e79e1bb27817fb9527ad074b652b11cdd20 (patch)
tree376c530775394f97236c00f5c5f8ed836df9bc2b /src/bank-lib/test_bank_api.c
parentedf24557bf07c92dd9b57fbf14923ec9c8ea77d4 (diff)
downloadexchange-75f47e79e1bb27817fb9527ad074b652b11cdd20.tar.gz
exchange-75f47e79e1bb27817fb9527ad074b652b11cdd20.tar.bz2
exchange-75f47e79e1bb27817fb9527ad074b652b11cdd20.zip
initial fixes to test exchange/bank interfacing
Diffstat (limited to 'src/bank-lib/test_bank_api.c')
-rw-r--r--src/bank-lib/test_bank_api.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c
index 086a0af3a..b1f811d80 100644
--- a/src/bank-lib/test_bank_api.c
+++ b/src/bank-lib/test_bank_api.c
@@ -39,39 +39,45 @@ run (void *cls)
int *resultp = cls;
static struct TBI_Command commands[] =
{
- /* Add EUR:5.01 to account 42 */
+ /* Ask complete history of 'Exchange' user (number 2) */
{ .oc = TBI_OC_HISTORY,
.label = "history-0",
- .details.history.account_number = 1,
+ .details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_BOTH,
.details.history.start_row_ref = NULL,
.details.history.num_results = 5 },
+ # if 0
+ /* Move money from Exchange to Bank */
{ .oc = TBI_OC_ADMIN_ADD_INCOMING,
.label = "deposit-1",
.details.admin_add_incoming.exchange_base_url = "https://exchange.net/", /* bogus */
.details.admin_add_incoming.expected_response_code = MHD_HTTP_OK,
.details.admin_add_incoming.credit_account_no = 1,
- .details.admin_add_incoming.debit_account_no = 2,
+ .details.admin_add_incoming.debit_account_no = 2, /* Ignored */
.details.admin_add_incoming.amount = "PUDOS:5.01" },
+ /* Move money from Exchange to Bank */
{ .oc = TBI_OC_ADMIN_ADD_INCOMING,
.label = "deposit-2",
.details.admin_add_incoming.exchange_base_url = "https://exchange.net/", /* bogus */
.details.admin_add_incoming.expected_response_code = MHD_HTTP_OK,
.details.admin_add_incoming.credit_account_no = 1,
- .details.admin_add_incoming.debit_account_no = 2,
+ .details.admin_add_incoming.debit_account_no = 2, /* Ignored */
.details.admin_add_incoming.amount = "PUDOS:5.01" },
+ /* Ask Exchange's incoming history */
{ .oc = TBI_OC_HISTORY,
.label = "history-1c",
- .details.history.account_number = 1,
+ .details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_CREDIT,
.details.history.start_row_ref = NULL,
.details.history.num_results = 5 },
+ /* Ask Exchange's outgoing history, 5 records into the future?? */
{ .oc = TBI_OC_HISTORY,
.label = "history-2d",
.details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_DEBIT,
.details.history.start_row_ref = NULL,
.details.history.num_results = 5 },
+ /* Ask Exchange's outgoing history, last 5 records */
{ .oc = TBI_OC_HISTORY,
.label = "history-2dr",
.details.history.account_number = 2,
@@ -84,6 +90,7 @@ run (void *cls)
.details.history.direction = TALER_BANK_DIRECTION_DEBIT,
.details.history.start_row_ref = "deposit-1",
.details.history.num_results = 5 },
+ #endif
{ .oc = TBI_OC_END }
};