diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-01-30 18:11:52 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-01-30 18:11:52 +0100 |
commit | 537af4631d922b2190b3a3ce8fbec6bdd4c8f2b9 (patch) | |
tree | 10f0f234d6f70f7d3c29ccd46e627d1ef05ac4c4 /src/lib | |
parent | 48b76fc0897a59419fc9f67cc7f60da218eacbfe (diff) |
Half baking #5447.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/test_auditor_api.c | 268 |
1 files changed, 268 insertions, 0 deletions
diff --git a/src/lib/test_auditor_api.c b/src/lib/test_auditor_api.c index 78db2a09a..67338d894 100644 --- a/src/lib/test_auditor_api.c +++ b/src/lib/test_auditor_api.c @@ -167,6 +167,7 @@ run (void *cls, * Make a reserve exist, according to the previous transfer. */ CMD_EXEC_WIREWATCH ("wirewatch-1"), + /** * Withdraw EUR:5. */ @@ -283,6 +284,85 @@ run (void *cls, ("check_bank_transfer-aai-2", exchange_url, "EUR:5.01", 42, 2), + /* The following transactions got originated within + * the "massive deposit confirms" batch. */ + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer", + exchange_url, + "EUR:10.10", + 42, + 2), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-1", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-2", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-3", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-4", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-5", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-6", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-7", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-8", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-9", + exchange_url, + "EUR:0.98", + 2, + 43), + + TALER_TESTING_cmd_check_bank_transfer + ("check-massive-transfer-10", + exchange_url, + "EUR:0.98", + 2, + 43), + TALER_TESTING_cmd_check_bank_empty ("check_bank_empty"), TALER_TESTING_cmd_end () }; @@ -353,6 +433,7 @@ run (void *cls, GNUNET_TIME_UNIT_MINUTES, "EUR:5", MHD_HTTP_OK), + TALER_TESTING_cmd_refund ("refund-ok", MHD_HTTP_OK, "EUR:5", @@ -470,6 +551,190 @@ run (void *cls, TALER_TESTING_cmd_end () }; + + struct TALER_TESTING_Command massive_deposit_confirms[] = { + + /** + * Move money to the exchange's bank account. + */ + CMD_TRANSFER_TO_EXCHANGE ("massive-reserve", + "EUR:10.10"), + + CMD_EXEC_WIREWATCH ("massive-wirewatch"), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-1", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-2", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-3", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-4", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-5", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-6", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-7", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-8", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-9", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_withdraw_amount ("massive-withdraw-10", + "massive-reserve", + "EUR:1", + MHD_HTTP_OK), + TALER_TESTING_cmd_deposit + ("massive-deposit-1", + "massive-withdraw-1", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-2", + "massive-withdraw-2", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-3", + "massive-withdraw-3", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-4", + "massive-withdraw-4", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-5", + "massive-withdraw-5", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-6", + "massive-withdraw-6", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-7", + "massive-withdraw-7", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-8", + "massive-withdraw-8", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_deposit + ("massive-deposit-9", + "massive-withdraw-9", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + + TALER_TESTING_cmd_deposit + ("massive-deposit-10", + "massive-withdraw-10", + 0, + TALER_TESTING_make_wire_details + (43, + fakebank_url), + "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", + GNUNET_TIME_UNIT_ZERO, + "EUR:1", + MHD_HTTP_OK), + + TALER_TESTING_cmd_end () + }; + struct TALER_TESTING_Command commands[] = { CMD_RUN_AUDITOR ("virgin-auditor"), @@ -477,6 +742,9 @@ run (void *cls, TALER_TESTING_cmd_exchanges_with_url ("check-exchange", MHD_HTTP_OK, "http://localhost:8081/"), + + TALER_TESTING_cmd_batch ("massive-deposit-confirms", + massive_deposit_confirms), TALER_TESTING_cmd_batch ("withdraw", withdraw), TALER_TESTING_cmd_batch ("spend", |