From 55ac4eda902dd14ee1a4d24e23d97b09fb73c832 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 16 Oct 2013 17:26:30 +0000 Subject: -start tests with fresh/empty database --- src/namestore/test_namestore_api.conf | 3 +++ src/namestore/test_namestore_api_cache_block.c | 3 ++- src/namestore/test_namestore_api_store_update.c | 1 + src/namestore/test_namestore_api_zone_iteration.c | 2 +- src/namestore/test_namestore_api_zone_iteration_specific_zone.c | 8 +++++--- src/namestore/test_namestore_api_zone_iteration_stop.c | 1 + 6 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/namestore/test_namestore_api.conf b/src/namestore/test_namestore_api.conf index 41670cdb1..8e797e994 100644 --- a/src/namestore/test_namestore_api.conf +++ b/src/namestore/test_namestore_api.conf @@ -1,3 +1,6 @@ +[PATHS] +GNUNET_TEST_HOME = /tmp/test-gnunet-namestore/ + [arm] PORT = 12000 DEFAULTSERVICES = namestore diff --git a/src/namestore/test_namestore_api_cache_block.c b/src/namestore/test_namestore_api_cache_block.c index 1fee80ec8..e13077f81 100644 --- a/src/namestore/test_namestore_api_cache_block.c +++ b/src/namestore/test_namestore_api_cache_block.c @@ -223,6 +223,7 @@ run (void *cls, int main (int argc, char *argv[]) { + GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); res = 1; if (0 != GNUNET_TESTING_service_run ("test-namestore-api", @@ -235,4 +236,4 @@ main (int argc, char *argv[]) } -/* end of test_namestore_api.c */ +/* end of test_namestore_api_cache_block.c */ diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 91b8511c9..4aa058a91 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c @@ -254,6 +254,7 @@ run (void *cls, int main (int argc, char *argv[]) { + GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); res = 1; if (0 != GNUNET_TESTING_service_run ("test-namestore-api-store-update", diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index 48671897e..d1992309d 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2009 Christian Grothoff (and other contributing authors) + (C) 2013 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index 7707c418e..858b724a5 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2009 Christian Grothoff (and other contributing authors) + (C) 2013 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -400,8 +400,9 @@ run (void *cls, nsh = GNUNET_NAMESTORE_connect (cfg); GNUNET_break (NULL != nsh); /* first, iterate over empty namestore */ - zi = GNUNET_NAMESTORE_zone_iteration_start(nsh, - NULL, &empty_zone_proc, nsh); + zi = GNUNET_NAMESTORE_zone_iteration_start (nsh, + NULL, + &empty_zone_proc, nsh); if (NULL == zi) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to create zone iterator\n"); @@ -415,6 +416,7 @@ run (void *cls, int main (int argc, char *argv[]) { + GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); res = 1; if (0 != GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration", diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index e56559f96..7b6824727 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c @@ -449,6 +449,7 @@ run (void *cls, int main (int argc, char *argv[]) { + GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); res = 1; if (0 != GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration-stop", -- cgit v1.2.3