diff options
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/test_exchange_p2p.c | 42 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_purse_get.c | 4 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_reserve_get.c | 5 |
3 files changed, 36 insertions, 15 deletions
diff --git a/src/testing/test_exchange_p2p.c b/src/testing/test_exchange_p2p.c index 39e6bb32c..e4d6f5b2f 100644 --- a/src/testing/test_exchange_p2p.c +++ b/src/testing/test_exchange_p2p.c @@ -158,7 +158,7 @@ run (void *cls, "EUR:1.01", NULL), TALER_TESTING_cmd_purse_poll ( - "poll-purse-before-merge", + "push-poll-purse-before-merge", MHD_HTTP_OK, "purse-with-deposit", "EUR:1", @@ -175,13 +175,24 @@ run (void *cls, "push-get-contract", "create-reserve-1"), TALER_TESTING_cmd_purse_poll_finish ( - "merge-purse-poll-finish", + "push-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! + "push-poll-purse-before-merge"), + TALER_TESTING_cmd_status ( + "push-check-post-merge-reserve-balance-get", + "create-reserve-1", + "EUR:1", + MHD_HTTP_OK), +#if FIXME + /* POST history doesn't yet support P2P transfers */ + TALER_TESTING_cmd_reserves_status ( + "push-check-post-merge-reserve-balance-post", + "create-reserve-1", + "EUR:1", + MHD_HTTP_OK), +#endif TALER_TESTING_cmd_end () }; struct TALER_TESTING_Command pull[] = { @@ -198,7 +209,7 @@ run (void *cls, false, /* for deposit */ "purse-create-with-reserve"), TALER_TESTING_cmd_purse_poll ( - "poll-purse-before-deposit", + "pull-poll-purse-before-deposit", MHD_HTTP_OK, "purse-create-with-reserve", "EUR:1", @@ -213,13 +224,24 @@ run (void *cls, "EUR:1.01", NULL), TALER_TESTING_cmd_purse_poll_finish ( - "deposit-purse-poll-finish", + "pull-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! + "pull-poll-purse-before-deposit"), + TALER_TESTING_cmd_status ( + "pull-check-post-merge-reserve-balance-get", + "create-reserve-1", + "EUR:2", + MHD_HTTP_OK), +#if FIXME + /* POST history doesn't yet support P2P transfers */ + TALER_TESTING_cmd_reserves_status ( + "push-check-post-merge-reserve-balance-post", + "create-reserve-1", + "EUR:2", + MHD_HTTP_OK), +#endif TALER_TESTING_cmd_end () }; diff --git a/src/testing/testing_api_cmd_purse_get.c b/src/testing/testing_api_cmd_purse_get.c index 828310ae7..3fc576912 100644 --- a/src/testing/testing_api_cmd_purse_get.c +++ b/src/testing/testing_api_cmd_purse_get.c @@ -141,7 +141,6 @@ purse_status_cb (void *cls, } if (MHD_HTTP_OK == ss->expected_response_code) { -#if 0 struct TALER_Amount eb; GNUNET_assert (GNUNET_OK == @@ -152,11 +151,10 @@ purse_status_cb (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unexpected amount in purse: %s\n", - TALER_amount_to_string (&rs->details.ok.balance)); + TALER_amount_to_string (&rs->details.success.balance)); TALER_TESTING_interpreter_fail (ss->is); return; } -#endif } if (NULL != ss->ps) { diff --git a/src/testing/testing_api_cmd_reserve_get.c b/src/testing/testing_api_cmd_reserve_get.c index b4375ee20..f9b8ff6cd 100644 --- a/src/testing/testing_api_cmd_reserve_get.c +++ b/src/testing/testing_api_cmd_reserve_get.c @@ -144,8 +144,9 @@ reserve_status_cb (void *cls, &rs->details.ok.balance)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected amount in reserve: %s\n", - TALER_amount_to_string (&rs->details.ok.balance)); + "Unexpected amount %s in reserve, wanted %s\n", + TALER_amount_to_string (&rs->details.ok.balance), + ss->expected_balance); TALER_TESTING_interpreter_fail (ss->is); return; } |