summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_bank_admin_add_incoming.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-06 13:25:54 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-06 13:25:54 +0200
commitc602e11a3642fe9cd59a3526fb4f99912e275092 (patch)
treeea533c922f53addc25a985541cd82c786ad336d7 /src/testing/testing_api_cmd_bank_admin_add_incoming.c
parent6834b1290fa4bd9d6331329282f72f1f67b4d1bf (diff)
downloadexchange-c602e11a3642fe9cd59a3526fb4f99912e275092.tar.gz
exchange-c602e11a3642fe9cd59a3526fb4f99912e275092.tar.bz2
exchange-c602e11a3642fe9cd59a3526fb4f99912e275092.zip
-merge eufin branch (manually)
Diffstat (limited to 'src/testing/testing_api_cmd_bank_admin_add_incoming.c')
-rw-r--r--src/testing/testing_api_cmd_bank_admin_add_incoming.c20
1 files changed, 20 insertions, 0 deletions
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);