[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 02/03: Test last change.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 02/03: Test last change. |
Date: |
Tue, 10 Jul 2018 15:39:56 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository exchange.
commit 6801c690b765794d839712361b87c046a2bd59e0
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jul 10 15:37:56 2018 +0200
Test last change.
---
src/exchangedb/plugin_exchangedb_postgres.c | 2 +-
src/exchangedb/test_exchangedb.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c
b/src/exchangedb/plugin_exchangedb_postgres.c
index e8da9a4..59b4cfa 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1305,7 +1305,7 @@ postgres_prepare (PGconn *db_conn)
* are stored into the table queried below. */
GNUNET_PQ_make_prepare ("get_kyc_events",
"SELECT"
- " merchant_serial_id,"
+ " merchant_serial_id"
",amount_val"
",amount_frac"
",amount_curr"
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c
index 5be7ecb..07372cf 100644
--- a/src/exchangedb/test_exchangedb.c
+++ b/src/exchangedb/test_exchangedb.c
@@ -364,20 +364,32 @@ kcs (void *cls,
struct TALER_EXCHANGEDB_Session *session = cls;
struct TALER_Amount amount;
+ struct TALER_Amount sum;
TALER_amount_get_zero (CURRENCY,
&amount);
+ amount.value = 30;
FAILIF
(GNUNET_OK != plugin->insert_kyc_event (NULL,
session,
merchant_serial_id,
&amount));
+ amount.value = 20;
+ amount.fraction = 70;
FAILIF
(GNUNET_OK != plugin->insert_kyc_event (NULL,
session,
merchant_serial_id,
&amount));
+ FAILIF
+ (0 >= plugin->get_kyc_events (NULL,
+ session,
+ merchant_serial_id,
+ &sum));
+
+ FAILIF ((50 != sum.value) || (70 != sum.fraction));
+
drop:
return;
}
--
To stop receiving notification emails like this one, please contact
address@hidden