summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-30 14:03:57 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-30 14:03:57 +0200
commitfed8353c67136c6252aaf4316d25a880f768ec7b (patch)
treea63a9bfbecddb469a5e670bed9ce01c97cf39a58 /src/testing
parentfb8349a7e3088f1ca0215ecebcfef553098d7ab9 (diff)
downloadexchange-fed8353c67136c6252aaf4316d25a880f768ec7b.tar.gz
exchange-fed8353c67136c6252aaf4316d25a880f768ec7b.tar.bz2
exchange-fed8353c67136c6252aaf4316d25a880f768ec7b.zip
-expand p2p tests with purse long poller
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/test_exchange_p2p.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/testing/test_exchange_p2p.c b/src/testing/test_exchange_p2p.c
index 8e5fea0e7..39e6bb32c 100644
--- a/src/testing/test_exchange_p2p.c
+++ b/src/testing/test_exchange_p2p.c
@@ -157,6 +157,13 @@ run (void *cls,
"withdraw-coin-1",
"EUR:1.01",
NULL),
+ TALER_TESTING_cmd_purse_poll (
+ "poll-purse-before-merge",
+ MHD_HTTP_OK,
+ "purse-with-deposit",
+ "EUR:1",
+ true,
+ GNUNET_TIME_UNIT_MINUTES),
TALER_TESTING_cmd_contract_get (
"push-get-contract",
MHD_HTTP_OK,
@@ -167,7 +174,13 @@ run (void *cls,
MHD_HTTP_OK,
"push-get-contract",
"create-reserve-1"),
- // FIXME: long-poll purse status
+ TALER_TESTING_cmd_purse_poll_finish (
+ "merge-purse-poll-finish",
+ GNUNET_TIME_relative_multiply (
+ GNUNET_TIME_UNIT_SECONDS,
+ 5),
+ "poll-purse-before-merge"),
+ // FIXME: trigger p2p job
// FIXME: check reserve history!
TALER_TESTING_cmd_end ()
};
@@ -184,6 +197,13 @@ run (void *cls,
MHD_HTTP_OK,
false, /* for deposit */
"purse-create-with-reserve"),
+ TALER_TESTING_cmd_purse_poll (
+ "poll-purse-before-deposit",
+ MHD_HTTP_OK,
+ "purse-create-with-reserve",
+ "EUR:1",
+ false,
+ GNUNET_TIME_UNIT_MINUTES),
TALER_TESTING_cmd_purse_deposit_coins (
"purse-deposit-coins",
MHD_HTTP_OK,
@@ -192,7 +212,13 @@ run (void *cls,
"withdraw-coin-1",
"EUR:1.01",
NULL),
- // FIXME: long-poll purse status
+ TALER_TESTING_cmd_purse_poll_finish (
+ "deposit-purse-poll-finish",
+ GNUNET_TIME_relative_multiply (
+ GNUNET_TIME_UNIT_SECONDS,
+ 5),
+ "poll-purse-before-deposit"),
+ // FIXME: trigger p2p job
// FIXME: check reserve history!
TALER_TESTING_cmd_end ()
};