summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_pay_order.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-18 12:36:04 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-18 12:36:04 +0200
commit8e7843ad5110109a5362864d3271a17a6c7f8fba (patch)
treecede23f2713e74fc7c6c3ad05d2b1ce34a8cf3f8 /src/testing/testing_api_cmd_pay_order.c
parentdc6a6c0ad87a34198a49ea31b39c2eb2bd1e0acb (diff)
downloadmerchant-8e7843ad5110109a5362864d3271a17a6c7f8fba.tar.gz
merchant-8e7843ad5110109a5362864d3271a17a6c7f8fba.tar.bz2
merchant-8e7843ad5110109a5362864d3271a17a6c7f8fba.zip
fix test
Diffstat (limited to 'src/testing/testing_api_cmd_pay_order.c')
-rw-r--r--src/testing/testing_api_cmd_pay_order.c26
1 files 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 */