summaryrefslogtreecommitdiff
path: root/src/auditordb/test_auditordb.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-04 10:54:20 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-04 10:54:20 +0100
commit126e3911ec52e7d50e6d41ba19f3decaeddc82af (patch)
treec214a12f74b4cbda73cbcf87e34fde97942c17b2 /src/auditordb/test_auditordb.c
parentb39c3f9ca626cf8908f4f552d481dd3e9d162140 (diff)
downloadexchange-126e3911ec52e7d50e6d41ba19f3decaeddc82af.tar.gz
exchange-126e3911ec52e7d50e6d41ba19f3decaeddc82af.tar.bz2
exchange-126e3911ec52e7d50e6d41ba19f3decaeddc82af.zip
extend test to also test insert/delete exchange operation
Diffstat (limited to 'src/auditordb/test_auditordb.c')
-rw-r--r--src/auditordb/test_auditordb.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/auditordb/test_auditordb.c b/src/auditordb/test_auditordb.c
index 65ea38e76..e640400e3 100644
--- a/src/auditordb/test_auditordb.c
+++ b/src/auditordb/test_auditordb.c
@@ -173,6 +173,15 @@ run (void *cls)
4));
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test: auditor_insert_exchange\n");
+ FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ plugin->insert_exchange (plugin->cls,
+ session,
+ &master_pub,
+ "https://exchange/"));
+
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Test: insert_denomination_info\n");
struct TALER_DenominationKeyValidityPS issue = { 0 };
@@ -724,7 +733,6 @@ run (void *cls)
&reserve_pub,
&master_pub));
-
FAILIF (0 != TALER_amount_cmp (&rbalance2,
&rbalance));
@@ -742,6 +750,21 @@ drop:
if (NULL != session)
plugin->rollback (plugin->cls,
session);
+
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Test: auditor_delete_exchange\n");
+ FAILIF (GNUNET_OK !=
+ plugin->start (plugin->cls,
+ session));
+ FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ plugin->delete_exchange (plugin->cls,
+ session,
+ &master_pub));
+ FAILIF (0 >
+ plugin->commit (plugin->cls,
+ session));
+
GNUNET_break (GNUNET_OK ==
plugin->drop_tables (plugin->cls));
unload: