aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-07-01 15:42:48 +0200
committerChristian Grothoff <grothoff@gnunet.org>2022-07-01 15:42:48 +0200
commitcebf4f11b90350d25d0c9f71e0d5354e0fda25d8 (patch)
tree7bfe33d052b4e656e16dfcebee6724c8a0c2fc44 /src/testing
parent182c618579919c45281e4a2554890b2f40d2a974 (diff)
downloadexchange-cebf4f11b90350d25d0c9f71e0d5354e0fda25d8.tar.xz
-add test for batch deposits
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/test_exchange_api.c26
-rw-r--r--src/testing/testing_api_cmd_batch_deposit.c7
2 files changed, 14 insertions, 19 deletions
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);