aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_exchange_p2p.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-23 19:32:07 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-23 19:32:07 +0200
commite270bc32cc94f251a9a953816e8c040a3a7bf3e1 (patch)
treef3ccc2bde5ab56f1cbfb8dadb3ca8bea8cdfd95f /src/testing/test_exchange_p2p.c
parentb054c969cbd84f7ed0f61da3db6a8168b944318f (diff)
downloadexchange-e270bc32cc94f251a9a953816e8c040a3a7bf3e1.tar.xz
-expand p2p test to cover purse-with-deposit-merge sequence
Diffstat (limited to 'src/testing/test_exchange_p2p.c')
-rw-r--r--src/testing/test_exchange_p2p.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/testing/test_exchange_p2p.c b/src/testing/test_exchange_p2p.c
index f1a7f6553..930ff2beb 100644
--- a/src/testing/test_exchange_p2p.c
+++ b/src/testing/test_exchange_p2p.c
@@ -151,14 +151,25 @@ run (void *cls,
/**
* Spend the coin.
*/
- TALER_TESTING_cmd_deposit ("deposit-simple",
- "withdraw-coin-1",
- 0,
- bc.user42_payto,
- "{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}",
- GNUNET_TIME_UNIT_ZERO,
- "EUR:5",
- MHD_HTTP_OK),
+ TALER_TESTING_cmd_purse_create_with_deposit (
+ "purse-with-deposit",
+ MHD_HTTP_OK,
+ "{\"amount\":\"EUR:1\",\"summary\":\"ice cream\"}",
+ true, /* upload contract */
+ GNUNET_TIME_UNIT_MINUTES, /* expiration */
+ "withdraw-coin-1",
+ "EUR:1", /* FIXME: check amount vs. fees! */
+ NULL),
+ TALER_TESTING_cmd_contract_get (
+ "purse-get-contract",
+ MHD_HTTP_OK,
+ "purse-with-deposit"),
+ TALER_TESTING_cmd_purse_merge (
+ "purse-merge-into-reserve",
+ MHD_HTTP_OK,
+ "purse-get-contract",
+ "create-reserve-1"),
+ // FIXME: check reserve history!
TALER_TESTING_cmd_end ()
};