diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-30 16:31:24 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-30 16:31:24 +0200 |
commit | 7b25787a4b8ac0a0b3cbc2174ba3cac9c564346a (patch) | |
tree | 60e9259939dca8f9bb9ad2539d594fb15e67a170 /src/testing/testing_api_cmd_bank_history_credit.c | |
parent | 7f902c0fc9bc7e0832d01169e6f580ab671fbf08 (diff) | |
download | exchange-7b25787a4b8ac0a0b3cbc2174ba3cac9c564346a.tar.xz |
-generate 404 on non-existing accounts for fakebank, use payto://-URIs with receiver-name in tests
Diffstat (limited to 'src/testing/testing_api_cmd_bank_history_credit.c')
-rw-r--r-- | src/testing/testing_api_cmd_bank_history_credit.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/testing/testing_api_cmd_bank_history_credit.c b/src/testing/testing_api_cmd_bank_history_credit.c index a7ad40a43..62bc47e11 100644 --- a/src/testing/testing_api_cmd_bank_history_credit.c +++ b/src/testing/testing_api_cmd_bank_history_credit.c @@ -311,7 +311,7 @@ build_history (struct TALER_TESTING_Interpreter *is, * @param details the expected transaction details. * @return #GNUNET_OK if the transaction is what we expect. */ -static int +static enum GNUNET_GenericReturnValue check_result (struct History *h, unsigned int total, unsigned int off, @@ -389,6 +389,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) || (hs->failed) || (MHD_HTTP_NO_CONTENT != http_status) ) @@ -422,10 +429,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; @@ -439,6 +447,8 @@ history_cb (void *cls, if (NULL != acc) free (acc); hs->failed = true; + hs->hh = NULL; + TALER_TESTING_interpreter_fail (is); return GNUNET_SYSERR; } hs->results_obtained++; |