summaryrefslogtreecommitdiff
path: root/src/testing/test_exchange_api.c
diff options
context:
space:
mode:
authorLucien Heuzeveldt <lucienclaude.heuzeveldt@students.bfh.ch>2022-01-08 20:41:01 +0100
committerGian Demarmels <gian@demarmels.org>2022-02-04 15:35:31 +0100
commit9074e66ebc8b73ecc98500f32af52088fd7f0722 (patch)
treee5e270bea1e2b3de44e915b428df01866a93203e /src/testing/test_exchange_api.c
parent4c7aa097840eb3254a6823177abcc90fa7ccf0d0 (diff)
downloadexchange-9074e66ebc8b73ecc98500f32af52088fd7f0722.tar.gz
exchange-9074e66ebc8b73ecc98500f32af52088fd7f0722.tar.bz2
exchange-9074e66ebc8b73ecc98500f32af52088fd7f0722.zip
implement withdraw (nonce reuse check missing)
Diffstat (limited to 'src/testing/test_exchange_api.c')
-rw-r--r--src/testing/test_exchange_api.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/testing/test_exchange_api.c b/src/testing/test_exchange_api.c
index 29a3e5c6f..ba293d4b9 100644
--- a/src/testing/test_exchange_api.c
+++ b/src/testing/test_exchange_api.c
@@ -413,49 +413,49 @@ run (void *cls,
/**
* Move money to the exchange's bank account.
*/
- CMD_TRANSFER_TO_EXCHANGE ("create-reserve-1",
+ CMD_TRANSFER_TO_EXCHANGE ("create-reserve-cs-1",
"EUR:6.02"),
- TALER_TESTING_cmd_check_bank_admin_transfer ("check-create-reserve-1",
+ TALER_TESTING_cmd_check_bank_admin_transfer ("check-create-reserve-cs-1",
"EUR:6.02",
bc.user42_payto,
bc.exchange_payto,
- "create-reserve-1"),
+ "create-reserve-cs-1"),
/**
* Make a reserve exist, according to the previous
* transfer.
*/
- CMD_EXEC_WIREWATCH ("wirewatch-1"),
+ CMD_EXEC_WIREWATCH ("wirewatch-cs-1"),
/**
* Withdraw EUR:5.
*/
TALER_TESTING_cmd_withdraw_cs_amount ("withdraw-cs-coin-1",
- "create-reserve-1",
+ "create-reserve-cs-1",
"EUR:5",
MHD_HTTP_OK),
- // TODO: rest of the tests
- // /**
- // * Withdraw EUR:1 using the SAME private coin key as for the previous coin
- // * (in violation of the specification, to be detected on spending!).
- // */
- // TALER_TESTING_cmd_withdraw_amount_reuse_key ("withdraw-coin-1x",
- // "create-reserve-1",
- // "EUR:1",
- // "withdraw-coin-1",
- // MHD_HTTP_OK),
- // /**
- // * Check the reserve is depleted.
- // */
- // TALER_TESTING_cmd_status ("status-1",
- // "create-reserve-1",
- // "EUR:0",
- // MHD_HTTP_OK),
- // /*
- // * Try to overdraw.
- // */
- // TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-2",
- // "create-reserve-1",
- // "EUR:5",
- // MHD_HTTP_CONFLICT),
+ /**
+ * Withdraw EUR:1 using the SAME private coin key as for the previous coin
+ * (in violation of the specification, to be detected on spending!).
+ */
+ TALER_TESTING_cmd_withdraw_cs_amount_reuse_key ("withdraw-cs-coin-1x",
+ "create-reserve-cs-1",
+ "EUR:1",
+ "withdraw-cs-coin-1",
+ MHD_HTTP_OK),
+ /**
+ * Check the reserve is depleted.
+ */
+ TALER_TESTING_cmd_status ("status-cs-1",
+ "create-reserve-cs-1",
+ "EUR:0",
+ MHD_HTTP_OK),
+ /*
+ * Try to overdraw.
+ */
+ TALER_TESTING_cmd_withdraw_cs_amount ("withdraw-cs-coin-2",
+ "create-reserve-cs-1",
+ "EUR:5",
+ MHD_HTTP_CONFLICT),
+ // TODO: add test for nonce reuse
TALER_TESTING_cmd_end ()
};