gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: Deleted file


From: gnunet
Subject: [taler-anastasis] branch master updated: Deleted file
Date: Fri, 01 Nov 2019 20:00:12 +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 546f177  Deleted file
546f177 is described below

commit 546f1774034039a91b4b5506cc702bc8eab119e1
Author: Dennis Neufeld <address@hidden>
AuthorDate: Fri Nov 1 18:59:59 2019 +0000

    Deleted file
---
 src/backup-db/test_anastasisdb.c | 198 ---------------------------------------
 1 file changed, 198 deletions(-)

diff --git a/src/backup-db/test_anastasisdb.c b/src/backup-db/test_anastasisdb.c
deleted file mode 100644
index ca81b19..0000000
--- a/src/backup-db/test_anastasisdb.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-  This file is part of TALER
-  (C) 2014-2017 INRIA
-
-  TALER is free software; you can redistribute it and/or modify it under the
-  terms of the GNU Lesser General Public License as published by the Free 
Software
-  Foundation; either version 3, or (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License along with
-  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
-*/
-/**
- * @file anastasis/test_anastasis_db.c
- * @brief testcase for anastasis postgres db plugin
- * @author Marcello Stanisci
- * @author Christian Grothoff
- */
-
-#include "platform.h"
-#include <gnunet/gnunet_util_lib.h>
-#include <gnunet/gnunet_db_lib.h>
-#include <taler/taler_util.h>
-#include "anastasis_database_lib.h"
-
-#define FAILIF(cond)                            \
-  do {                                          \
-    if (! (cond)) { break;}                       \
-    GNUNET_break (0);                           \
-    goto drop;                                  \
-  } while (0)
-
-#define RND_BLK(ptr)                                                    \
-  GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK, ptr, sizeof (*ptr))
-
-/**
- * Global return value for the test.  Initially -1, set to 0 upon
- * completion.   Other values indicate some kind of error.
- */
-static int result;
-
-/**
- * Handle to the plugin we are testing.
- */
-static struct ANASTASIS_DatabasePlugin *plugin;
-
-/**
- * Payment Secret for the test, set to a random value
- */
-static struct ANASTASIS_PaymentSecretP paymentSecretP;
-
-/**
- * UUID of the Truth to test, set to a UUID value
- */
-static struct ANASTASIS_uuid uuid;
-
-/**
- * User public key, set to a random value
- */
-static struct ANASTASIS_AccountPubP accountPubP;
-
-/**
- * Amount which is deposited, set to random value
- */
-static struct TALER_Amount amount;
-
-/**
- * How many posts are paid by the payment
- */
-const unsigned int *post_counter;
-
-/**
- * Recoverydata which is stored into the Database, set to a random value
- */
-const void *recovery_data;
-
-/**
- * Truthdata which is stored into the Database, set to a random value
- */
-const void *truth_data;
-
-/**
- * Keyshare which is stored into the Database, set to a random value
- */
-const void *key_share;
-
-/**
- * Version of a Recoverydocument
- */
-const unsigned int *version;
-
-
-/**
- * Main function that will be run by the scheduler.
- *
- * @param cls closure with config
- */
-static void
-run (void *cls)
-{
-  struct GNUNET_CONFIGURATION_Handle *cfg = cls;
-  struct GNUNET_TIME_Absolute fake_now;
-
-  if (NULL == (plugin = ANASTASIS_DB_plugin_load (cls)))
-  {
-    result = 77;
-    return;
-  }
-  if (GNUNET_OK != plugin->drop_tables (plugin->cls))
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Dropping tables failed\n");
-    result = 77;
-    return;
-  }
-  ANASTASIS_DB_plugin_unload (plugin);
-  if (NULL == (plugin = ANASTASIS_DB_plugin_load (cls)))
-  {
-    result = 77;
-    return;
-  }
-
-  FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
-          plugin->store_recovery_document (plugin->cls,
-                                           accountPubP,
-                                           recovery_data,
-                                           recovery_data_size,
-                                           paymentSecretP,
-                                           version));
-  FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
-          plugin->record_payment (plugin->cls,
-                                  amount,
-                                  accountPubP,
-                                  &post_counter,
-                                  fake_now,
-                                  paymentSecretP));
-  FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
-          plugin->store_truth (plugin->cls,
-                               uuid,
-                               truth_data,
-                               truth_data_size,
-                               fake_now,
-                               version));
-
-  if (-1 == result)
-    result = 0;
-
-drop:
-  GNUNET_break (GNUNET_OK ==
-                plugin->drop_tables (plugin->cls));
-  ANASTASIS_DB_plugin_unload (plugin);
-  plugin = NULL;
-}
-
-int
-main (int argc,
-      char *const argv[])
-{
-  const char *plugin_name;
-  char *config_filename;
-  char *testname;
-  struct GNUNET_CONFIGURATION_Handle *cfg;
-
-  result = -1;
-  if (NULL == (plugin_name = strrchr (argv[0], (int) '-')))
-  {
-    GNUNET_break (0);
-    return -1;
-  }
-  GNUNET_log_setup (argv[0], "DEBUG", NULL);
-  plugin_name++;
-  (void) GNUNET_asprintf (&testname,
-                          "test_anastasis_db_%s",
-                          plugin_name);
-  (void) GNUNET_asprintf (&config_filename,
-                          "%s.conf",
-                          testname);
-  cfg = GNUNET_CONFIGURATION_create ();
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_parse (cfg,
-                                  config_filename))
-  {
-    GNUNET_break (0);
-    GNUNET_free (config_filename);
-    GNUNET_free (testname);
-    return 2;
-  }
-  GNUNET_SCHEDULER_run (&run, cfg);
-  GNUNET_CONFIGURATION_destroy (cfg);
-  GNUNET_free (config_filename);
-  GNUNET_free (testname);
-  return result;
-}
-
-/* end of test_anastasis_db.c */

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]