Test last change.

This commit is contained in:
Marcello Stanisci 2018-07-10 15:37:56 +02:00
parent 61e737f03e
commit 6801c690b7
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 17 additions and 5 deletions

View File

@ -1305,7 +1305,7 @@ postgres_prepare (PGconn *db_conn)
* are stored into the table queried below. */ * are stored into the table queried below. */
GNUNET_PQ_make_prepare ("get_kyc_events", GNUNET_PQ_make_prepare ("get_kyc_events",
"SELECT" "SELECT"
" merchant_serial_id," " merchant_serial_id"
",amount_val" ",amount_val"
",amount_frac" ",amount_frac"
",amount_curr" ",amount_curr"

View File

@ -364,20 +364,32 @@ kcs (void *cls,
struct TALER_EXCHANGEDB_Session *session = cls; struct TALER_EXCHANGEDB_Session *session = cls;
struct TALER_Amount amount; struct TALER_Amount amount;
struct TALER_Amount sum;
TALER_amount_get_zero (CURRENCY, TALER_amount_get_zero (CURRENCY,
&amount); &amount);
amount.value = 30;
FAILIF
(GNUNET_OK != plugin->insert_kyc_event (NULL,
session,
merchant_serial_id,
&amount));
amount.value = 20;
amount.fraction = 70;
FAILIF FAILIF
(GNUNET_OK != plugin->insert_kyc_event (NULL, (GNUNET_OK != plugin->insert_kyc_event (NULL,
session, session,
merchant_serial_id, merchant_serial_id,
&amount)); &amount));
FAILIF FAILIF
(GNUNET_OK != plugin->insert_kyc_event (NULL, (0 >= plugin->get_kyc_events (NULL,
session, session,
merchant_serial_id, merchant_serial_id,
&amount)); &sum));
FAILIF ((50 != sum.value) || (70 != sum.fraction));
drop: drop:
return; return;
} }