commit a5d0452b2a46f875a1879b2e836d0d5e3ede6167
parent 687963a200e03449f36eb7be8f298a266fbb29e0
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Tue, 18 Dec 2018 11:25:50 +0100
Fix /history tests.
Diffstat:
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
@@ -334,7 +334,7 @@ run (void *cls,
*/
1, // nresult
10, // start
- 10), // nrows
+ -10), // nrows
TALER_TESTING_cmd_end ()
@@ -458,9 +458,7 @@ run (void *cls,
*/
2,
10,
- 10),
-
-
+ -10),
TALER_TESTING_cmd_end ()
};
@@ -1049,11 +1047,6 @@ run (void *cls,
TALER_TESTING_cmd_batch ("track",
track),
-
- /**
- * Just a weird /history request, not really tied to
- * any CMD chunk.
- */
TALER_TESTING_cmd_history
("history-2",
merchant_url,
@@ -1061,7 +1054,8 @@ run (void *cls,
MHD_HTTP_OK,
GNUNET_TIME_absolute_add (GNUNET_TIME_UNIT_ZERO_ABS,
GNUNET_TIME_UNIT_MICROSECONDS),
- /* zero results expected, time too ancient. */
+ /* zero results expected, there isn't any row with id
+ * bigger than 10. */
0,
10,
10),
diff --git a/src/lib/testing_api_cmd_history.c b/src/lib/testing_api_cmd_history.c
@@ -265,7 +265,7 @@ history_run (void *cls,
hs->merchant_url,
"default",
hs->start,
- (-1) * hs->nrows,
+ hs->nrows,
hs->time,
&history_cb,
hs)))