summaryrefslogtreecommitdiff
path: root/src/testing/test_exchange_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-10 22:33:04 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-10 22:33:04 +0200
commitddf95c491af05732220ac35c6fb1bea48e6f4050 (patch)
tree7003f28a16a693c10d71ba2ddd16232491c2fb42 /src/testing/test_exchange_api.c
parentd01c6fd9028ff766d7604533b30c949e5bec5527 (diff)
downloadexchange-ddf95c491af05732220ac35c6fb1bea48e6f4050.tar.gz
exchange-ddf95c491af05732220ac35c6fb1bea48e6f4050.tar.bz2
exchange-ddf95c491af05732220ac35c6fb1bea48e6f4050.zip
remove unused/unusable coin_sig, return correct coin_pub in recoup-reveal failure context
Diffstat (limited to 'src/testing/test_exchange_api.c')
-rw-r--r--src/testing/test_exchange_api.c77
1 files changed, 55 insertions, 22 deletions
diff --git a/src/testing/test_exchange_api.c b/src/testing/test_exchange_api.c
index b8ec36996..410c1a492 100644
--- a/src/testing/test_exchange_api.c
+++ b/src/testing/test_exchange_api.c
@@ -675,28 +675,61 @@ run (void *cls,
"recoup-reveal-coin-1b",
"recoup-melt-coin-1b",
"EUR:5"),
-#if 1
- /* "over-spend" 10 EUR recoup-refreshed coin */
- TALER_TESTING_cmd_deposit ("recoup-refresh-deposit-failing",
- "recoup-withdraw-coin-1b",
- 0,
- bc.user42_payto,
- "{\"items\":[{\"name\":\"more ice cream\",\"value\":1}]}",
- GNUNET_TIME_UNIT_ZERO,
- "EUR:11.5",
- MHD_HTTP_OK),
- // FIXME: yes, we expect 'CONFLICT', but the
- // coin history we get is totally wrong!
- /* "spend" 10 EUR recoup-refreshed coin */
- TALER_TESTING_cmd_deposit ("recoup-refresh-deposit-ok",
- "recoup-withdraw-coin-1b",
- 0,
- bc.user42_payto,
- "{\"items\":[{\"name\":\"more ice cream\",\"value\":1}]}",
- GNUNET_TIME_UNIT_ZERO,
- "EUR:9.5", /* FIXME: pick 'right' amount! */
- MHD_HTTP_OK),
-#endif
+ /* melt 10 EUR coin *again* to get 1 EUR refreshed coin */
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1a",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_refresh_reveal ("recoup-reveal-coin-1a",
+ "recoup-remelt-coin-1a",
+ MHD_HTTP_OK),
+ /* Try melting for more than the residual value to provoke an error */
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1b",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1c",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1d",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1e",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1f",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1g",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1h",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1i",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_OK,
+ "EUR:1",
+ NULL),
+ TALER_TESTING_cmd_melt ("recoup-remelt-coin-1b-failing",
+ "recoup-withdraw-coin-1b",
+ MHD_HTTP_CONFLICT,
+ "EUR:1",
+ NULL),
/* Re-withdraw from this reserve */
TALER_TESTING_cmd_withdraw_amount ("recoup-withdraw-coin-2",
"recoup-create-reserve-1",