summaryrefslogtreecommitdiff
path: root/src/exchange-lib/test_exchange_api_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange-lib/test_exchange_api_new.c')
-rw-r--r--src/exchange-lib/test_exchange_api_new.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/exchange-lib/test_exchange_api_new.c b/src/exchange-lib/test_exchange_api_new.c
index 3b50d70d1..b0819f81b 100644
--- a/src/exchange-lib/test_exchange_api_new.c
+++ b/src/exchange-lib/test_exchange_api_new.c
@@ -457,6 +457,57 @@ run (void *cls,
};
+ /**
+ * This block checks whether a wire deadline
+ * very far in the future does NOT get aggregated now.
+ */
+ struct TALER_TESTING_Command unaggregation[] = {
+
+ TALER_TESTING_cmd_check_bank_empty
+ ("far-future-aggregation-a"),
+
+ CMD_TRANSFER_TO_EXCHANGE ("create-reserve-unaggregated",
+ "EUR:5.01"),
+
+ CMD_EXEC_WIREWATCH ("wirewatch-unaggregated"),
+
+ /* "consume" reserve creation transfer. */
+ TALER_TESTING_cmd_check_bank_transfer
+ ("check_bank_transfer-unaggregated",
+ exchange_url,
+ "EUR:5.01",
+ 42,
+ 2),
+
+ TALER_TESTING_cmd_withdraw_amount
+ ("withdraw-coin-unaggregated",
+ is->exchange,
+ "create-reserve-unaggregated",
+ "EUR:5",
+ MHD_HTTP_OK),
+
+ TALER_TESTING_cmd_deposit
+ ("deposit-unaggregated",
+ is->exchange,
+ "withdraw-coin-unaggregated",
+ 0,
+ TALER_TESTING_make_wire_details
+ (43,
+ fakebank_url),
+ "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}",
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ "EUR:5",
+ MHD_HTTP_OK),
+
+ CMD_EXEC_AGGREGATOR ("aggregation-attempt"),
+
+ TALER_TESTING_cmd_check_bank_empty
+ ("far-future-aggregation-b"),
+
+ TALER_TESTING_cmd_end ()
+ };
+
+
struct TALER_TESTING_Command refund[] = {
/**
@@ -839,6 +890,9 @@ run (void *cls,
TALER_TESTING_cmd_batch ("track",
track),
+ TALER_TESTING_cmd_batch ("unaggregation",
+ unaggregation),
+
TALER_TESTING_cmd_batch ("refund",
refund),