From c602e11a3642fe9cd59a3526fb4f99912e275092 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 6 Aug 2022 13:25:54 +0200 Subject: -merge eufin branch (manually) --- .../testing_api_cmd_bank_admin_add_incoming.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/testing/testing_api_cmd_bank_admin_add_incoming.c') diff --git a/src/testing/testing_api_cmd_bank_admin_add_incoming.c b/src/testing/testing_api_cmd_bank_admin_add_incoming.c index 28d251a4f..9db874faf 100644 --- a/src/testing/testing_api_cmd_bank_admin_add_incoming.c +++ b/src/testing/testing_api_cmd_bank_admin_add_incoming.c @@ -217,6 +217,26 @@ confirmation_cb (void *cls, fts->reserve_history.details.in_details.timestamp = timestamp; fts->reserve_history.details.in_details.wire_reference = serial_id; fts->aih = NULL; + /** + * Test case not caring about the HTTP status code. + * That helps when Fakebank and Libeufin diverge in + * the response status code. An example is the + * /admin/add-incoming: libeufin return ALWAYS '200 OK' + * (see note below) whereas the Fakebank responds with + * '409 Conflict' upon a duplicate reserve public key. + * + * Note: this decision aims at avoiding to put Taler + * logic into the Sandbox; that's because banks DO allow + * their customers to wire the same subject multiple + * times. Hence, instead of triggering any error, libeufin + * bounces the payment back in the same way it does for + * malformed reserve public keys. + */ + if (-1 == fts->expected_http_status) + { + TALER_TESTING_interpreter_next (is); + return; + } if (http_status != fts->expected_http_status) { GNUNET_break (0); -- cgit v1.2.3