From e270bc32cc94f251a9a953816e8c040a3a7bf3e1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 23 Apr 2022 19:32:07 +0200 Subject: -expand p2p test to cover purse-with-deposit-merge sequence --- src/testing/testing_api_cmd_purse_create_deposit.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/testing/testing_api_cmd_purse_create_deposit.c') diff --git a/src/testing/testing_api_cmd_purse_create_deposit.c b/src/testing/testing_api_cmd_purse_create_deposit.c index af7ed3f5..13b2dffa 100644 --- a/src/testing/testing_api_cmd_purse_create_deposit.c +++ b/src/testing/testing_api_cmd_purse_create_deposit.c @@ -355,13 +355,13 @@ struct TALER_TESTING_Command TALER_TESTING_cmd_purse_create_with_deposit ( const char *label, unsigned int expected_http_status, - const char *target_amount, const char *contract_terms, bool upload_contract, struct GNUNET_TIME_Relative purse_expiration, ...) { struct PurseCreateDepositState *ds; + struct GNUNET_TIME_Timestamp pay_deadline; ds = GNUNET_new (struct PurseCreateDepositState); ds->rel_expiration = purse_expiration; @@ -378,6 +378,14 @@ TALER_TESTING_cmd_purse_create_with_deposit ( label); GNUNET_assert (0); } + pay_deadline = + GNUNET_TIME_absolute_to_timestamp ( + GNUNET_TIME_relative_to_absolute (purse_expiration)); + GNUNET_assert (0 == + json_object_set_new ( + ds->contract_terms, + "pay_deadline", + GNUNET_JSON_from_timestamp (pay_deadline))); { va_list ap; unsigned int i; @@ -410,9 +418,6 @@ TALER_TESTING_cmd_purse_create_with_deposit ( } va_end (ap); } - GNUNET_assert (GNUNET_OK == - TALER_string_to_amount (target_amount, - &ds->target_amount)); { struct TALER_TESTING_Command cmd = { .cls = ds, -- cgit v1.2.3