[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 01/04: Refund test CMD takes expected HTTP
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 01/04: Refund test CMD takes expected HTTP code. |
Date: |
Tue, 22 May 2018 08:59:23 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit 2f6093eef65d4f0dded4ce5af40cb32eeff0a456
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon May 21 14:02:11 2018 +0200
Refund test CMD takes expected HTTP code.
---
src/include/taler_merchant_testing_lib.h | 3 ++-
src/lib/test_merchant_api.conf | 2 +-
src/lib/test_merchant_api_new.c | 16 +++++++++-------
src/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
index 304a16b..3563151 100644
--- 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
index 7f1d086..7b79170 100644
--- 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
index aaa4a07..e78c57c 100644
--- 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
index 7cae8c6..2202510 100644
--- 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;
--
To stop receiving notification emails like this one, please contact
address@hidden