summaryrefslogtreecommitdiff
path: root/src/lib/test_merchant_api.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-12-13 17:38:20 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-12-13 17:38:20 +0100
commit2cce6fed1b4811e560a30ba7ba7884255d8f10b0 (patch)
tree208fe12a2cddcde719ae50ac8f1c65f030f7b1db /src/lib/test_merchant_api.c
parent9f1b0480d93a850c88353baab8710082ac51d70b (diff)
downloadmerchant-2cce6fed1b4811e560a30ba7ba7884255d8f10b0.tar.gz
merchant-2cce6fed1b4811e560a30ba7ba7884255d8f10b0.tar.bz2
merchant-2cce6fed1b4811e560a30ba7ba7884255d8f10b0.zip
Adapt tests to last change.
Diffstat (limited to 'src/lib/test_merchant_api.c')
-rw-r--r--src/lib/test_merchant_api.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 628181c8..83025518 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -812,12 +812,12 @@ struct Command
* The backend will return records with row_id
* less than this value.
*/
- unsigned int start;
+ unsigned long long start;
/**
* The backend will return at most `nrows` records.
*/
- unsigned int nrows;
+ long long nrows;
} history;
@@ -3865,6 +3865,7 @@ interpreter_run (void *cls)
return;
}
case OC_HISTORY:
+ /* If given as zero, convert it as now+1_hour. */
if (0 == cmd->details.history.date.abs_value_us)
{
cmd->details.history.date = GNUNET_TIME_absolute_add
@@ -4346,7 +4347,7 @@ run (void *cls)
*/
.details.history.nresult = 1,
.details.history.start = 10,
- .details.history.nrows = 10
+ .details.history.nrows = -10
},
/* Fill second reserve with EUR:1 */
@@ -4510,17 +4511,20 @@ run (void *cls)
*/
.details.history.nresult = 2,
.details.history.start = 10,
- .details.history.nrows = 10
+ .details.history.nrows = -10
},
{ .oc = OC_HISTORY,
.label = "history-2",
.expected_response_code = MHD_HTTP_OK,
- /*no records returned, time limit too ancient*/
+ /* no records returned, time limit too ancient
+ * and start's too high. */
.details.history.date.abs_value_us = 1,
.details.history.nresult = 0,
+ /* younger than 'start' */
.details.history.start = 10,
.details.history.nrows = 10
+ /* end of "younger than 'start'" */
},
{ .oc = OC_REFUND_INCREASE,