aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_exchange_api_revocation.c
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-03-20 14:01:59 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-03-20 14:01:59 +0530
commit6a46b13e80659cbc9917b46f74d21b4f4aaf6c3b (patch)
treeba2793ddfa23dfe156433434495e73220efc6a70 /src/testing/test_exchange_api_revocation.c
parentc17f05b5fdddfc3a26285777b437120dbfe0bb1e (diff)
downloadexchange-6a46b13e80659cbc9917b46f74d21b4f4aaf6c3b.tar.xz
make recoup idempotent and simplify response
Diffstat (limited to 'src/testing/test_exchange_api_revocation.c')
-rw-r--r--src/testing/test_exchange_api_revocation.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/testing/test_exchange_api_revocation.c b/src/testing/test_exchange_api_revocation.c
index 467b93e9a..05ec06b16 100644
--- a/src/testing/test_exchange_api_revocation.c
+++ b/src/testing/test_exchange_api_revocation.c
@@ -117,27 +117,31 @@ run (void *cls,
TALER_TESTING_cmd_recoup ("recoup-1a",
MHD_HTTP_OK,
"refresh-reveal-1#0",
- "EUR:1",
"refresh-melt-1"),
TALER_TESTING_cmd_recoup ("recoup-1b",
MHD_HTTP_OK,
"refresh-reveal-1#1",
- "EUR:1",
"refresh-melt-1"),
TALER_TESTING_cmd_recoup ("recoup-1c",
MHD_HTTP_OK,
"refresh-reveal-1#2",
- "EUR:1",
+ "refresh-melt-1"),
+ /* Repeat recoup to test idempotency */
+ TALER_TESTING_cmd_recoup ("recoup-1c",
+ MHD_HTTP_OK,
+ "refresh-reveal-1#2",
+ "refresh-melt-1"),
+ TALER_TESTING_cmd_recoup ("recoup-1c",
+ MHD_HTTP_OK,
+ "refresh-reveal-1#2",
"refresh-melt-1"),
TALER_TESTING_cmd_recoup ("recoup-1c",
MHD_HTTP_OK,
"refresh-reveal-1#2",
- "EUR:1",
"refresh-melt-1"),
TALER_TESTING_cmd_recoup ("recoup-1c",
MHD_HTTP_OK,
"refresh-reveal-1#2",
- "EUR:1",
"refresh-melt-1"),
/* Now we have EUR:3.83 EUR back after 3x EUR:1 in recoups */
/* Melt original coin AGAIN, but only create one 0.1 EUR coin;
@@ -168,14 +172,12 @@ run (void *cls,
TALER_TESTING_cmd_recoup ("recoup-2",
MHD_HTTP_OK,
"refresh-reveal-2",
- "EUR:0.1",
"refresh-melt-2"),
/* Due to recoup, original coin is now at EUR:3.79 */
/* Refund original (now zombie) coin to reserve */
TALER_TESTING_cmd_recoup ("recoup-3",
MHD_HTTP_OK,
"withdraw-revocation-coin-1",
- "EUR:3.79",
NULL),
/* Check the money is back with the reserve */
TALER_TESTING_cmd_status ("recoup-reserve-status-1",