From 7b25787a4b8ac0a0b3cbc2174ba3cac9c564346a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 30 May 2022 16:31:24 +0200 Subject: -generate 404 on non-existing accounts for fakebank, use payto://-URIs with receiver-name in tests --- src/testing/testing_api_cmd_bank_history_debit.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/testing/testing_api_cmd_bank_history_debit.c') diff --git a/src/testing/testing_api_cmd_bank_history_debit.c b/src/testing/testing_api_cmd_bank_history_debit.c index a1dee81e..cb3f6809 100644 --- a/src/testing/testing_api_cmd_bank_history_debit.c +++ b/src/testing/testing_api_cmd_bank_history_debit.c @@ -391,6 +391,13 @@ history_cb (void *cls, if (NULL == details) { hs->hh = NULL; + if ( (MHD_HTTP_NOT_FOUND == http_status) && + (0 == hs->total) ) + { + /* not found is OK for empty history */ + TALER_TESTING_interpreter_next (is); + return GNUNET_OK; + } if ( (hs->results_obtained != hs->total) || (GNUNET_YES == hs->failed) || (MHD_HTTP_NO_CONTENT != http_status) ) @@ -424,10 +431,11 @@ history_cb (void *cls, } /* check current element */ - if (GNUNET_OK != check_result (hs->h, - hs->total, - hs->results_obtained, - details)) + if (GNUNET_OK != + check_result (hs->h, + hs->total, + hs->results_obtained, + details)) { char *acc; @@ -441,6 +449,8 @@ history_cb (void *cls, if (NULL != acc) free (acc); hs->failed = GNUNET_YES; + hs->hh = NULL; + TALER_TESTING_interpreter_fail (is); return GNUNET_SYSERR; } hs->results_obtained++; -- cgit v1.2.3