Half baking #5447.

This commit is contained in:
Marcello Stanisci 2019-01-30 18:11:52 +01:00
parent 48b76fc089
commit 537af4631d
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F

View File

@ -167,6 +167,7 @@ run (void *cls,
* Make a reserve exist, according to the previous transfer. * Make a reserve exist, according to the previous transfer.
*/ */
CMD_EXEC_WIREWATCH ("wirewatch-1"), CMD_EXEC_WIREWATCH ("wirewatch-1"),
/** /**
* Withdraw EUR:5. * Withdraw EUR:5.
*/ */
@ -283,6 +284,85 @@ run (void *cls,
("check_bank_transfer-aai-2", exchange_url, ("check_bank_transfer-aai-2", exchange_url,
"EUR:5.01", 42, 2), "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_check_bank_empty ("check_bank_empty"),
TALER_TESTING_cmd_end () TALER_TESTING_cmd_end ()
}; };
@ -353,6 +433,7 @@ run (void *cls,
GNUNET_TIME_UNIT_MINUTES, GNUNET_TIME_UNIT_MINUTES,
"EUR:5", "EUR:5",
MHD_HTTP_OK), MHD_HTTP_OK),
TALER_TESTING_cmd_refund ("refund-ok", TALER_TESTING_cmd_refund ("refund-ok",
MHD_HTTP_OK, MHD_HTTP_OK,
"EUR:5", "EUR:5",
@ -470,6 +551,190 @@ run (void *cls,
TALER_TESTING_cmd_end () 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[] = { struct TALER_TESTING_Command commands[] = {
CMD_RUN_AUDITOR ("virgin-auditor"), CMD_RUN_AUDITOR ("virgin-auditor"),
@ -477,6 +742,9 @@ run (void *cls,
TALER_TESTING_cmd_exchanges_with_url ("check-exchange", TALER_TESTING_cmd_exchanges_with_url ("check-exchange",
MHD_HTTP_OK, MHD_HTTP_OK,
"http://localhost:8081/"), "http://localhost:8081/"),
TALER_TESTING_cmd_batch ("massive-deposit-confirms",
massive_deposit_confirms),
TALER_TESTING_cmd_batch ("withdraw", TALER_TESTING_cmd_batch ("withdraw",
withdraw), withdraw),
TALER_TESTING_cmd_batch ("spend", TALER_TESTING_cmd_batch ("spend",