[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: Fixed errors in test-file
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: Fixed errors in test-file |
Date: |
Sat, 02 Nov 2019 13:57:33 +0100 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 1ac6cfa Fixed errors in test-file
1ac6cfa is described below
commit 1ac6cfafe3765edd50363bfee26eb2a5353c3528
Author: Dennis Neufeld <address@hidden>
AuthorDate: Sat Nov 2 12:57:07 2019 +0000
Fixed errors in test-file
---
src/backup-db/test_anastasis_db.c | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/backup-db/test_anastasis_db.c
b/src/backup-db/test_anastasis_db.c
index 8fa633b..8f919cf 100644
--- a/src/backup-db/test_anastasis_db.c
+++ b/src/backup-db/test_anastasis_db.c
@@ -22,9 +22,11 @@
#include "platform.h"
#include <gnunet/gnunet_util_lib.h>
-#include <gnunet/gnunet_db_lib.h>
#include <taler/taler_util.h>
+#include "anastasis_database_plugin.h"
#include "anastasis_database_lib.h"
+#include "anastasis_error_codes.h"
+
#define FAILIF(cond) \
do { \
@@ -55,7 +57,7 @@ static struct ANASTASIS_PaymentSecretP *paymentSecretP;
/**
* UUID of the Truth to test, set to a UUID value
*/
-static struct ANASTASIS_uuid uuid;
+static struct ANASTASIS_uuid *uuid;
/**
* User public key, set to a random value
@@ -65,12 +67,12 @@ static struct ANASTASIS_AccountPubP *accountPubP;
/**
* Amount which is deposited, set to random value
*/
-static struct TALER_Amount amount;
+const struct TALER_Amount *amount;
/**
* How many posts are paid by the payment
*/
-const unsigned int *post_counter;
+unsigned int post_counter;
/**
* Recoverydata which is stored into the Database, set to a random value
@@ -87,6 +89,11 @@ const void *truth_data;
*/
const void *key_share;
+/**
+ * Mime-type fo truth
+ */
+const char *mime_type;
+
/**
* Version of a Recoverydocument
*/
@@ -102,7 +109,7 @@ static void
run (void *cls)
{
struct GNUNET_CONFIGURATION_Handle *cfg = cls;
- struct GNUNET_TIME_Absolute fake_now;
+ struct GNUNET_TIME_Relative rel_time;
if (NULL == (plugin = ANASTASIS_DB_plugin_load (cls)))
{
@@ -123,27 +130,29 @@ run (void *cls)
return;
}
- FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ FAILIF (ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->store_recovery_document (plugin->cls,
accountPubP,
recovery_data,
sizeof (*recovery_data),
paymentSecretP,
version));
- FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ FAILIF (ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->record_payment (plugin->cls,
amount,
accountPubP,
- &post_counter,
- fake_now,
+ post_counter,
+ rel_time,
paymentSecretP));
- FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ FAILIF (ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->store_truth (plugin->cls,
uuid,
truth_data,
sizeof (*truth_data),
- fake_now,
- version));
+ mime_type,
+ key_share,
+ sizeof (*key_share),
+ rel_time));
if (-1 == result)
result = 0;
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: Fixed errors in test-file,
gnunet <=