Adapt "/history" tests to the new policy of 'start' defaults.
This commit is contained in:
parent
a3979b583f
commit
9914a9b301
@ -74,7 +74,7 @@ run (void *cls)
|
|||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
.details.history.direction = TALER_BANK_DIRECTION_CREDIT,
|
.details.history.direction = TALER_BANK_DIRECTION_CREDIT,
|
||||||
.details.history.start_row_ref = NULL,
|
.details.history.start_row_ref = NULL,
|
||||||
.details.history.num_results = -5 },
|
.details.history.num_results = 5 },
|
||||||
/* Ask Exchange's outgoing history, 5 records into the future */
|
/* Ask Exchange's outgoing history, 5 records into the future */
|
||||||
{ .oc = TBI_OC_HISTORY,
|
{ .oc = TBI_OC_HISTORY,
|
||||||
.label = "history-2d",
|
.label = "history-2d",
|
||||||
@ -88,7 +88,7 @@ run (void *cls)
|
|||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
.details.history.direction = TALER_BANK_DIRECTION_DEBIT,
|
.details.history.direction = TALER_BANK_DIRECTION_DEBIT,
|
||||||
.details.history.start_row_ref = NULL,
|
.details.history.start_row_ref = NULL,
|
||||||
.details.history.num_results = -5 },
|
.details.history.num_results = 5 },
|
||||||
{ .oc = TBI_OC_HISTORY,
|
{ .oc = TBI_OC_HISTORY,
|
||||||
.label = "history-2fwd",
|
.label = "history-2fwd",
|
||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
@ -103,7 +103,7 @@ run (void *cls)
|
|||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
.details.history.direction = TALER_BANK_DIRECTION_CREDIT,
|
.details.history.direction = TALER_BANK_DIRECTION_CREDIT,
|
||||||
.details.history.start_row_ref = NULL,
|
.details.history.start_row_ref = NULL,
|
||||||
.details.history.num_results = -5 },
|
.details.history.num_results = 5 },
|
||||||
{ .oc = TBI_OC_HISTORY,
|
{ .oc = TBI_OC_HISTORY,
|
||||||
.label = "history-r2",
|
.label = "history-r2",
|
||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
@ -115,7 +115,7 @@ run (void *cls)
|
|||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
.details.history.direction = TALER_BANK_DIRECTION_BOTH | TALER_BANK_DIRECTION_CANCEL,
|
.details.history.direction = TALER_BANK_DIRECTION_BOTH | TALER_BANK_DIRECTION_CANCEL,
|
||||||
.details.history.start_row_ref = NULL,
|
.details.history.start_row_ref = NULL,
|
||||||
.details.history.num_results = -5 },
|
.details.history.num_results = 5 },
|
||||||
{ .oc = TBI_OC_END }
|
{ .oc = TBI_OC_END }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,22 +68,14 @@ run (void *cls,
|
|||||||
|
|
||||||
struct TALER_TESTING_Command commands[] = {
|
struct TALER_TESTING_Command commands[] = {
|
||||||
|
|
||||||
/**
|
|
||||||
* NOTE: this command uses internally the _fakebank_ version
|
|
||||||
* of the add-incoming command. However, this does seem to
|
|
||||||
* work fine against the Python bank too! Some renaming is
|
|
||||||
* required..
|
|
||||||
*/
|
|
||||||
TALER_TESTING_cmd_bank_history ("history-0",
|
TALER_TESTING_cmd_bank_history ("history-0",
|
||||||
bank_url,
|
bank_url,
|
||||||
EXCHANGE_ACCOUNT_NUMBER,
|
EXCHANGE_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_BOTH,
|
TALER_BANK_DIRECTION_BOTH,
|
||||||
GNUNET_NO,
|
GNUNET_NO,
|
||||||
NULL,
|
NULL, /* start */
|
||||||
5),
|
5),
|
||||||
|
|
||||||
/* WARNING: old API has expected http response code among
|
|
||||||
* the parameters, although it was always set as '200 OK' */
|
|
||||||
TALER_TESTING_cmd_fakebank_transfer_with_subject
|
TALER_TESTING_cmd_fakebank_transfer_with_subject
|
||||||
("deposit-1",
|
("deposit-1",
|
||||||
"KUDOS:5.01",
|
"KUDOS:5.01",
|
||||||
@ -111,15 +103,15 @@ run (void *cls,
|
|||||||
bank_url,
|
bank_url,
|
||||||
EXCHANGE_ACCOUNT_NUMBER,
|
EXCHANGE_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_CREDIT,
|
TALER_BANK_DIRECTION_CREDIT,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
-5),
|
5),
|
||||||
|
|
||||||
TALER_TESTING_cmd_bank_history ("history-1d",
|
TALER_TESTING_cmd_bank_history ("history-1d",
|
||||||
bank_url,
|
bank_url,
|
||||||
EXCHANGE_ACCOUNT_NUMBER,
|
EXCHANGE_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_DEBIT,
|
TALER_BANK_DIRECTION_DEBIT,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
5),
|
5),
|
||||||
|
|
||||||
@ -127,15 +119,15 @@ run (void *cls,
|
|||||||
bank_url,
|
bank_url,
|
||||||
EXCHANGE_ACCOUNT_NUMBER,
|
EXCHANGE_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_DEBIT,
|
TALER_BANK_DIRECTION_DEBIT,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
-5),
|
5),
|
||||||
|
|
||||||
TALER_TESTING_cmd_bank_history ("history-2fwd",
|
TALER_TESTING_cmd_bank_history ("history-2fwd",
|
||||||
bank_url,
|
bank_url,
|
||||||
EXCHANGE_ACCOUNT_NUMBER,
|
EXCHANGE_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_DEBIT,
|
TALER_BANK_DIRECTION_DEBIT,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
"deposit-1",
|
"deposit-1",
|
||||||
5),
|
5),
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ run (void *cls)
|
|||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
.details.history.direction = TALER_BANK_DIRECTION_BOTH,
|
.details.history.direction = TALER_BANK_DIRECTION_BOTH,
|
||||||
.details.history.start_row_ref = NULL,
|
.details.history.start_row_ref = NULL,
|
||||||
.details.history.num_results = -5 },
|
.details.history.num_results = 5 },
|
||||||
{ .oc = TBI_OC_HISTORY,
|
{ .oc = TBI_OC_HISTORY,
|
||||||
.label = "history-2bi",
|
.label = "history-2bi",
|
||||||
.details.history.account_number = 2,
|
.details.history.account_number = 2,
|
||||||
@ -130,13 +130,13 @@ run (void *cls)
|
|||||||
in the history. So to see the rejected transfer, we need to start
|
in the history. So to see the rejected transfer, we need to start
|
||||||
looking after "credit-2" */
|
looking after "credit-2" */
|
||||||
.details.history.start_row_ref = NULL,
|
.details.history.start_row_ref = NULL,
|
||||||
.details.history.num_results = -5 },
|
.details.history.num_results = 5 },
|
||||||
{ .oc = TBI_OC_HISTORY,
|
{ .oc = TBI_OC_HISTORY,
|
||||||
.label = "history-r1c",
|
.label = "history-r1c",
|
||||||
.details.history.account_number = 1,
|
.details.history.account_number = 1,
|
||||||
.details.history.direction = TALER_BANK_DIRECTION_BOTH | TALER_BANK_DIRECTION_CANCEL,
|
.details.history.direction = TALER_BANK_DIRECTION_BOTH | TALER_BANK_DIRECTION_CANCEL,
|
||||||
.details.history.start_row_ref = NULL,
|
.details.history.start_row_ref = NULL,
|
||||||
.details.history.num_results = -5 },
|
.details.history.num_results = 5 },
|
||||||
{ .oc = TBI_OC_EXPECT_TRANSFER,
|
{ .oc = TBI_OC_EXPECT_TRANSFER,
|
||||||
.label = "expect-credit-reject-1",
|
.label = "expect-credit-reject-1",
|
||||||
.details.expect_transfer.cmd_ref = "credit-for-reject-1" },
|
.details.expect_transfer.cmd_ref = "credit-for-reject-1" },
|
||||||
|
@ -73,7 +73,7 @@ run (void *cls,
|
|||||||
fakebank_url,
|
fakebank_url,
|
||||||
BANK_ACCOUNT_NUMBER,
|
BANK_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_BOTH,
|
TALER_BANK_DIRECTION_BOTH,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
1),
|
1),
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ run (void *cls,
|
|||||||
fakebank_url,
|
fakebank_url,
|
||||||
BANK_ACCOUNT_NUMBER,
|
BANK_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_CREDIT,
|
TALER_BANK_DIRECTION_CREDIT,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
5),
|
5),
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ run (void *cls,
|
|||||||
fakebank_url,
|
fakebank_url,
|
||||||
BANK_ACCOUNT_NUMBER,
|
BANK_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_DEBIT,
|
TALER_BANK_DIRECTION_DEBIT,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
5),
|
5),
|
||||||
|
|
||||||
@ -133,9 +133,9 @@ run (void *cls,
|
|||||||
fakebank_url,
|
fakebank_url,
|
||||||
EXCHANGE_ACCOUNT_NUMBER,
|
EXCHANGE_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_BOTH,
|
TALER_BANK_DIRECTION_BOTH,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
-5),
|
5),
|
||||||
|
|
||||||
TALER_TESTING_cmd_bank_history ("history-2bi",
|
TALER_TESTING_cmd_bank_history ("history-2bi",
|
||||||
fakebank_url,
|
fakebank_url,
|
||||||
@ -175,18 +175,18 @@ run (void *cls,
|
|||||||
fakebank_url,
|
fakebank_url,
|
||||||
BANK_ACCOUNT_NUMBER,
|
BANK_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_BOTH,
|
TALER_BANK_DIRECTION_BOTH,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
-5),
|
5),
|
||||||
|
|
||||||
TALER_TESTING_cmd_bank_history ("history-r1c",
|
TALER_TESTING_cmd_bank_history ("history-r1c",
|
||||||
fakebank_url,
|
fakebank_url,
|
||||||
BANK_ACCOUNT_NUMBER,
|
BANK_ACCOUNT_NUMBER,
|
||||||
TALER_BANK_DIRECTION_BOTH |
|
TALER_BANK_DIRECTION_BOTH |
|
||||||
TALER_BANK_DIRECTION_CANCEL,
|
TALER_BANK_DIRECTION_CANCEL,
|
||||||
GNUNET_NO,
|
GNUNET_YES,
|
||||||
NULL,
|
NULL,
|
||||||
-5),
|
5),
|
||||||
|
|
||||||
TALER_TESTING_cmd_check_bank_transfer_with_ref
|
TALER_TESTING_cmd_check_bank_transfer_with_ref
|
||||||
("expect-credit-reject-1",
|
("expect-credit-reject-1",
|
||||||
|
@ -794,7 +794,7 @@ interpreter_run (void *cls)
|
|||||||
&auth,
|
&auth,
|
||||||
cmd->details.history.account_number,
|
cmd->details.history.account_number,
|
||||||
cmd->details.history.direction,
|
cmd->details.history.direction,
|
||||||
cmd->details.history.ascending,
|
GNUNET_YES,
|
||||||
rowid,
|
rowid,
|
||||||
cmd->details.history.num_results,
|
cmd->details.history.num_results,
|
||||||
&history_cb,
|
&history_cb,
|
||||||
|
Loading…
Reference in New Issue
Block a user