[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: fix DB test
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: fix DB test |
Date: |
Mon, 27 Jul 2020 13:51:29 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 40761c7 fix DB test
40761c7 is described below
commit 40761c7e877b89c800ef092075ab7ec616a9d19e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jul 27 13:51:26 2020 +0200
fix DB test
---
src/backenddb/plugin_merchantdb_postgres.c | 6 +++++-
src/backenddb/test_merchantdb.c | 6 ++++++
src/include/taler_merchantdb_plugin.h | 2 ++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/backenddb/plugin_merchantdb_postgres.c
b/src/backenddb/plugin_merchantdb_postgres.c
index 84e1bce..60f42a1 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -1331,6 +1331,7 @@ postgres_lookup_orders (void *cls,
* @param instance_id identifies the instance responsible for the order
* @param order_id alphanumeric string that uniquely identifies the proposal
* @param pay_deadline how long does the customer have to pay for the order
+ * @param claim_token token to use for access control
* @param contract_terms proposal data to store
* @return transaction status
*/
@@ -1339,6 +1340,7 @@ postgres_insert_order (void *cls,
const char *instance_id,
const char *order_id,
struct GNUNET_TIME_Absolute pay_deadline,
+ const struct TALER_ClaimTokenP *claim_token,
const json_t *contract_terms)
{
struct PostgresClosure *pg = cls;
@@ -1347,6 +1349,7 @@ postgres_insert_order (void *cls,
GNUNET_PQ_query_param_string (instance_id),
GNUNET_PQ_query_param_string (order_id),
GNUNET_PQ_query_param_absolute_time (&pay_deadline),
+ GNUNET_PQ_query_param_auto_from_type (claim_token),
GNUNET_PQ_query_param_absolute_time (&now),
TALER_PQ_query_param_json (contract_terms),
GNUNET_PQ_query_param_end
@@ -7043,10 +7046,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
"(merchant_serial"
",order_id"
",pay_deadline"
+ ",claim_token"
",creation_time"
",contract_terms)"
" SELECT merchant_serial,"
- " $2, $3, $4, $5"
+ " $2, $3, $4, $5, $6"
" FROM merchant_instances"
" WHERE merchant_id=$1",
5),
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index 12391d1..fbbdaa1 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -1346,11 +1346,17 @@ test_insert_order (const struct InstanceData *instance,
const struct OrderData *order,
enum GNUNET_DB_QueryStatus expected_result)
{
+ struct TALER_ClaimTokenP no_token;
+
+ memset (&no_token,
+ 0,
+ sizeof (no_token));
TEST_COND_RET_ON_FAIL (expected_result ==
plugin->insert_order (plugin->cls,
instance->instance.id,
order->id,
order->pay_deadline,
+ &no_token,
order->contract),
"Insert order failed\n");
return 0;
diff --git a/src/include/taler_merchantdb_plugin.h
b/src/include/taler_merchantdb_plugin.h
index 9ee61e9..247a06d 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -1000,6 +1000,7 @@ struct TALER_MERCHANTDB_Plugin
* @param instance_id identifies the instance responsible for the order
* @param order_id alphanumeric string that uniquely identifies the order
* @param pay_deadline how long does the customer have to pay for the order
+ * @param claim_token token to use for access control
* @param contract_terms proposal data to store
* @return transaction status
*/
@@ -1008,6 +1009,7 @@ struct TALER_MERCHANTDB_Plugin
const char *instance_id,
const char *order_id,
struct GNUNET_TIME_Absolute pay_deadline,
+ const struct TALER_ClaimTokenP *claim_token,
const json_t *contract_terms);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: fix DB test,
gnunet <=