Adapt "/history" tests to the new policy of 'start' defaults.

This commit is contained in:
Marcello Stanisci 2019-03-21 18:47:35 +01:00
parent a3979b583f
commit 9914a9b301
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
5 changed files with 24 additions and 32 deletions

View File

@ -74,7 +74,7 @@ run (void *cls)
.details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_CREDIT,
.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 */
{ .oc = TBI_OC_HISTORY,
.label = "history-2d",
@ -88,7 +88,7 @@ run (void *cls)
.details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_DEBIT,
.details.history.start_row_ref = NULL,
.details.history.num_results = -5 },
.details.history.num_results = 5 },
{ .oc = TBI_OC_HISTORY,
.label = "history-2fwd",
.details.history.account_number = 2,
@ -103,7 +103,7 @@ run (void *cls)
.details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_CREDIT,
.details.history.start_row_ref = NULL,
.details.history.num_results = -5 },
.details.history.num_results = 5 },
{ .oc = TBI_OC_HISTORY,
.label = "history-r2",
.details.history.account_number = 2,
@ -115,7 +115,7 @@ run (void *cls)
.details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_BOTH | TALER_BANK_DIRECTION_CANCEL,
.details.history.start_row_ref = NULL,
.details.history.num_results = -5 },
.details.history.num_results = 5 },
{ .oc = TBI_OC_END }
};

View File

@ -68,22 +68,14 @@ run (void *cls,
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",
bank_url,
EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_BOTH,
GNUNET_NO,
NULL,
NULL, /* start */
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
("deposit-1",
"KUDOS:5.01",
@ -111,15 +103,15 @@ run (void *cls,
bank_url,
EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_CREDIT,
GNUNET_NO,
GNUNET_YES,
NULL,
-5),
5),
TALER_TESTING_cmd_bank_history ("history-1d",
bank_url,
EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_DEBIT,
GNUNET_NO,
GNUNET_YES,
NULL,
5),
@ -127,15 +119,15 @@ run (void *cls,
bank_url,
EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_DEBIT,
GNUNET_NO,
GNUNET_YES,
NULL,
-5),
5),
TALER_TESTING_cmd_bank_history ("history-2fwd",
bank_url,
EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_DEBIT,
GNUNET_NO,
GNUNET_YES,
"deposit-1",
5),

View File

@ -88,7 +88,7 @@ run (void *cls)
.details.history.account_number = 2,
.details.history.direction = TALER_BANK_DIRECTION_BOTH,
.details.history.start_row_ref = NULL,
.details.history.num_results = -5 },
.details.history.num_results = 5 },
{ .oc = TBI_OC_HISTORY,
.label = "history-2bi",
.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
looking after "credit-2" */
.details.history.start_row_ref = NULL,
.details.history.num_results = -5 },
.details.history.num_results = 5 },
{ .oc = TBI_OC_HISTORY,
.label = "history-r1c",
.details.history.account_number = 1,
.details.history.direction = TALER_BANK_DIRECTION_BOTH | TALER_BANK_DIRECTION_CANCEL,
.details.history.start_row_ref = NULL,
.details.history.num_results = -5 },
.details.history.num_results = 5 },
{ .oc = TBI_OC_EXPECT_TRANSFER,
.label = "expect-credit-reject-1",
.details.expect_transfer.cmd_ref = "credit-for-reject-1" },

View File

@ -73,7 +73,7 @@ run (void *cls,
fakebank_url,
BANK_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_BOTH,
GNUNET_NO,
GNUNET_YES,
NULL,
1),
@ -95,7 +95,7 @@ run (void *cls,
fakebank_url,
BANK_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_CREDIT,
GNUNET_NO,
GNUNET_YES,
NULL,
5),
@ -103,7 +103,7 @@ run (void *cls,
fakebank_url,
BANK_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_DEBIT,
GNUNET_NO,
GNUNET_YES,
NULL,
5),
@ -133,9 +133,9 @@ run (void *cls,
fakebank_url,
EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_BOTH,
GNUNET_NO,
GNUNET_YES,
NULL,
-5),
5),
TALER_TESTING_cmd_bank_history ("history-2bi",
fakebank_url,
@ -175,18 +175,18 @@ run (void *cls,
fakebank_url,
BANK_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_BOTH,
GNUNET_NO,
GNUNET_YES,
NULL,
-5),
5),
TALER_TESTING_cmd_bank_history ("history-r1c",
fakebank_url,
BANK_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_BOTH |
TALER_BANK_DIRECTION_CANCEL,
GNUNET_NO,
GNUNET_YES,
NULL,
-5),
5),
TALER_TESTING_cmd_check_bank_transfer_with_ref
("expect-credit-reject-1",

View File

@ -794,7 +794,7 @@ interpreter_run (void *cls)
&auth,
cmd->details.history.account_number,
cmd->details.history.direction,
cmd->details.history.ascending,
GNUNET_YES,
rowid,
cmd->details.history.num_results,
&history_cb,