From 8e7843ad5110109a5362864d3271a17a6c7f8fba Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 18 May 2020 12:36:04 +0200 Subject: fix test --- src/testing/testing_api_cmd_pay_order.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c index dbffe4fa..ee47ae5e 100644 --- a/src/testing/testing_api_cmd_pay_order.c +++ b/src/testing/testing_api_cmd_pay_order.c @@ -231,17 +231,28 @@ pay_cb (void *cls, struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("sig", &sig), - GNUNET_JSON_spec_fixed_auto ("h_contract_terms", - &ps->h_contract_terms), GNUNET_JSON_spec_end () }; const struct TALER_TESTING_Command *proposal_cmd; - GNUNET_assert (GNUNET_OK == - GNUNET_JSON_parse (hr->reply, - spec, - &error_name, - &error_line)); + if (GNUNET_OK != + GNUNET_JSON_parse (hr->reply, + spec, + &error_name, + &error_line)) + { + char *js; + + js = json_dumps (hr->reply, + JSON_INDENT (1)); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Parser failed on %s:%u for input `%s'\n", + error_name, + error_line, + js); + free (js); + TALER_TESTING_FAIL (ps->is); + } mr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_PAYMENT_OK); mr.purpose.size = htonl (sizeof (mr)); mr.h_contract_terms = ps->h_contract_terms; @@ -392,6 +403,7 @@ pay_run (void *cls, 0, &h_proposal)) TALER_TESTING_FAIL (is); + ps->h_contract_terms = *h_proposal; ps->oph = TALER_MERCHANT_order_pay (is->ctx, ps->merchant_url, "", /* session ID */ -- cgit v1.2.3