From cebf4f11b90350d25d0c9f71e0d5354e0fda25d8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Jul 2022 15:42:48 +0200 Subject: -add test for batch deposits --- src/testing/test_exchange_api.c | 26 ++++++++++---------------- src/testing/testing_api_cmd_batch_deposit.c | 7 ++++--- 2 files changed, 14 insertions(+), 19 deletions(-) (limited to 'src/testing') diff --git a/src/testing/test_exchange_api.c b/src/testing/test_exchange_api.c index f7318d648..f30701c34 100644 --- a/src/testing/test_exchange_api.c +++ b/src/testing/test_exchange_api.c @@ -1183,22 +1183,16 @@ run (void *cls, /** * Spend the coins. */ - TALER_TESTING_cmd_deposit ("deposit-batch-simple-1", - "batch-withdraw-coin-1", - 0, - bc.user42_payto, - "{\"items\":[{\"name\":\"ice cream\",\"value\":5}]}", - GNUNET_TIME_UNIT_ZERO, - "EUR:5", - MHD_HTTP_OK), - TALER_TESTING_cmd_deposit ("deposit-batch-simple-2", - "batch-withdraw-coin-1", - 1, - bc.user42_payto, - "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}", - GNUNET_TIME_UNIT_ZERO, - "EUR:1", - MHD_HTTP_OK), + TALER_TESTING_cmd_batch_deposit ("batch-deposit-1", + bc.user42_payto, + "{\"items\":[{\"name\":\"ice cream\",\"value\":5}]}", + GNUNET_TIME_UNIT_ZERO, + MHD_HTTP_OK, + "batch-withdraw-coin-1#0", + "EUR:5", + "batch-withdraw-coin-1#1", + "EUR:1", + NULL), TALER_TESTING_cmd_end () }; diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c index 031978497..2ea03a51b 100644 --- a/src/testing/testing_api_cmd_batch_deposit.c +++ b/src/testing/testing_api_cmd_batch_deposit.c @@ -317,9 +317,10 @@ batch_deposit_run (void *cls, const struct TALER_AgeCommitmentProof *age_commitment_proof = NULL; GNUNET_assert (NULL != coin->coin_reference); - coin->coin_cmd = TALER_TESTING_interpreter_lookup_command (is, - coin-> - coin_reference); + cdd->amount = coin->amount; + coin->coin_cmd = TALER_TESTING_interpreter_lookup_command ( + is, + coin->coin_reference); if (NULL == coin->coin_cmd) { GNUNET_break (0); -- cgit v1.2.3