aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-16 17:26:30 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-16 17:26:30 +0000
commit55ac4eda902dd14ee1a4d24e23d97b09fb73c832 (patch)
treeda930c37ca3ef67ad81f2444f40e5434c2d64172
parent5f150dc35f1ed2606db11c53f9c6bb554b258535 (diff)
-start tests with fresh/empty database
-rw-r--r--src/namestore/test_namestore_api.conf3
-rw-r--r--src/namestore/test_namestore_api_cache_block.c3
-rw-r--r--src/namestore/test_namestore_api_store_update.c1
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c2
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c8
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c1
6 files changed, 13 insertions, 5 deletions
diff --git a/src/namestore/test_namestore_api.conf b/src/namestore/test_namestore_api.conf
index 41670cdb19..8e797e9940 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 1fee80ec8a..e13077f81d 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 91b8511c99..4aa058a91a 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 48671897e7..d1992309d6 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 7707c418e2..858b724a5b 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 e56559f96c..7b6824727e 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",