merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 2f6093eef65d4f0dded4ce5af40cb32eeff0a456
parent c85dd0f649eca36fea664c5a56ca794bf3005e9a
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Mon, 21 May 2018 14:02:11 +0200

Refund test CMD takes expected HTTP code.

Diffstat:
Msrc/include/taler_merchant_testing_lib.h | 3++-
Msrc/lib/test_merchant_api.conf | 2+-
Msrc/lib/test_merchant_api_new.c | 16+++++++++-------
Msrc/lib/testing_api_cmd_refund.c | 6+++++-
4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h @@ -233,7 +233,8 @@ TALER_TESTING_cmd_refund_increase const char *reason, const char *order_id, const char *refund_amount, - const char *refund_fee); + const char *refund_fee, + unsigned int http_code); /** diff --git a/src/lib/test_merchant_api.conf b/src/lib/test_merchant_api.conf @@ -113,7 +113,7 @@ ACTIVE_dtip = YES [exchange-kudos] MASTER_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG CURRENCY = KUDOS -URL = http://localhost:8081/ +BASE_URL = http://localhost:8081/ # Auditors must be in sections "auditor-", the rest of the section diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c @@ -455,13 +455,15 @@ run (void *cls, 10, 10), - TALER_TESTING_cmd_refund_increase ("refund-increase-1", - merchant_url, - is->ctx, - "refund test", - "1", - "EUR:0.1", - "EUR:0.01"), + TALER_TESTING_cmd_refund_increase + ("refund-increase-1", + merchant_url, + is->ctx, + "refund test", + "1", + "EUR:0.1", + "EUR:0.01", + MHD_HTTP_OK), TALER_TESTING_cmd_refund_lookup ("refund-lookup-1", merchant_url, diff --git a/src/lib/testing_api_cmd_refund.c b/src/lib/testing_api_cmd_refund.c @@ -47,6 +47,8 @@ struct RefundIncreaseState const char *reason; struct TALER_TESTING_Interpreter *is; + + unsigned int http_code; }; struct RefundLookupState @@ -400,7 +402,8 @@ TALER_TESTING_cmd_refund_increase const char *reason, const char *order_id, const char *refund_amount, - const char *refund_fee) + const char *refund_fee, + unsigned int http_code) { struct RefundIncreaseState *ris; struct TALER_TESTING_Command cmd; @@ -412,6 +415,7 @@ TALER_TESTING_cmd_refund_increase ris->refund_amount = refund_amount; ris->refund_fee = refund_fee; ris->reason = reason; + ris->http_code = http_code; cmd.cls = ris; cmd.label = label;