diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-05-04 23:52:54 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-05-04 23:52:54 +0200 |
commit | 69fa9b41d1896d2d2beeee086308f62b4f1e35c4 (patch) | |
tree | 8a6e021b1ecff81f32d3a52dd9cec98732c05a68 /src/bank-lib/test_bank_api.c | |
parent | 0e632ffdd26d2473f476e6311f9ab544eb8c8a39 (diff) |
start to add /history testing support to tests, fix some minor issues
Diffstat (limited to 'src/bank-lib/test_bank_api.c')
-rw-r--r-- | src/bank-lib/test_bank_api.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 28b0b6dca..ee85fa610 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -40,13 +40,48 @@ run (void *cls) static struct TBI_Command commands[] = { /* Add EUR:5.01 to account 42 */ + { .oc = TBI_OC_HISTORY, + .label = "history-0", + .details.history.account_number = 1, + .details.history.direction = TALER_BANK_DIRECTION_BOTH, + .details.history.start_row = 0, + .details.history.num_results = 5 }, { .oc = TBI_OC_ADMIN_ADD_INCOMING, .label = "deposit-1", .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.amount = "PUDOS:5.01" }, - + { .oc = TBI_OC_ADMIN_ADD_INCOMING, + .label = "deposit-2", + .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.amount = "PUDOS:5.01" }, + { .oc = TBI_OC_HISTORY, + .label = "history-1c", + .details.history.account_number = 1, + .details.history.direction = TALER_BANK_DIRECTION_CREDIT, + .details.history.start_row = 0, + .details.history.num_results = 5 }, + { .oc = TBI_OC_HISTORY, + .label = "history-2d", + .details.history.account_number = 2, + .details.history.direction = TALER_BANK_DIRECTION_DEBIT, + .details.history.start_row = 0, + .details.history.num_results = 5 }, + { .oc = TBI_OC_HISTORY, + .label = "history-2dr", + .details.history.account_number = 2, + .details.history.direction = TALER_BANK_DIRECTION_DEBIT, + .details.history.start_row = UINT64_MAX, + .details.history.num_results = -5 }, + { .oc = TBI_OC_HISTORY, + .label = "history-2fwd", + .details.history.account_number = 2, + .details.history.direction = TALER_BANK_DIRECTION_DEBIT, + .details.history.start_row = 1, + .details.history.num_results = 5 }, { .oc = TBI_OC_END } }; @@ -92,7 +127,7 @@ main (int argc, "serve-http", "--port", "8081", NULL); - if (NULL == bankd_admin) + if (NULL == bankd_admin) { fprintf (stderr, "Failed to launch `taler-bank-manage' for admin, skipping test\n"); |