diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-16 17:26:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-16 17:26:30 +0000 |
commit | 55ac4eda902dd14ee1a4d24e23d97b09fb73c832 (patch) | |
tree | da930c37ca3ef67ad81f2444f40e5434c2d64172 /src | |
parent | 5f150dc35f1ed2606db11c53f9c6bb554b258535 (diff) | |
download | gnunet-55ac4eda902dd14ee1a4d24e23d97b09fb73c832.tar.gz gnunet-55ac4eda902dd14ee1a4d24e23d97b09fb73c832.zip |
-start tests with fresh/empty database
Diffstat (limited to 'src')
6 files changed, 13 insertions, 5 deletions
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 @@ | |||
1 | [PATHS] | ||
2 | GNUNET_TEST_HOME = /tmp/test-gnunet-namestore/ | ||
3 | |||
1 | [arm] | 4 | [arm] |
2 | PORT = 12000 | 5 | PORT = 12000 |
3 | DEFAULTSERVICES = namestore | 6 | 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, | |||
223 | int | 223 | int |
224 | main (int argc, char *argv[]) | 224 | main (int argc, char *argv[]) |
225 | { | 225 | { |
226 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
226 | res = 1; | 227 | res = 1; |
227 | if (0 != | 228 | if (0 != |
228 | GNUNET_TESTING_service_run ("test-namestore-api", | 229 | GNUNET_TESTING_service_run ("test-namestore-api", |
@@ -235,4 +236,4 @@ main (int argc, char *argv[]) | |||
235 | } | 236 | } |
236 | 237 | ||
237 | 238 | ||
238 | /* end of test_namestore_api.c */ | 239 | /* 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, | |||
254 | int | 254 | int |
255 | main (int argc, char *argv[]) | 255 | main (int argc, char *argv[]) |
256 | { | 256 | { |
257 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
257 | res = 1; | 258 | res = 1; |
258 | if (0 != | 259 | if (0 != |
259 | GNUNET_TESTING_service_run ("test-namestore-api-store-update", | 260 | 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 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2009 Christian Grothoff (and other contributing authors) | 3 | (C) 2013 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | 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 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2009 Christian Grothoff (and other contributing authors) | 3 | (C) 2013 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -400,8 +400,9 @@ run (void *cls, | |||
400 | nsh = GNUNET_NAMESTORE_connect (cfg); | 400 | nsh = GNUNET_NAMESTORE_connect (cfg); |
401 | GNUNET_break (NULL != nsh); | 401 | GNUNET_break (NULL != nsh); |
402 | /* first, iterate over empty namestore */ | 402 | /* first, iterate over empty namestore */ |
403 | zi = GNUNET_NAMESTORE_zone_iteration_start(nsh, | 403 | zi = GNUNET_NAMESTORE_zone_iteration_start (nsh, |
404 | NULL, &empty_zone_proc, nsh); | 404 | NULL, |
405 | &empty_zone_proc, nsh); | ||
405 | if (NULL == zi) | 406 | if (NULL == zi) |
406 | { | 407 | { |
407 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to create zone iterator\n"); | 408 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to create zone iterator\n"); |
@@ -415,6 +416,7 @@ run (void *cls, | |||
415 | int | 416 | int |
416 | main (int argc, char *argv[]) | 417 | main (int argc, char *argv[]) |
417 | { | 418 | { |
419 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
418 | res = 1; | 420 | res = 1; |
419 | if (0 != | 421 | if (0 != |
420 | GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration", | 422 | 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, | |||
449 | int | 449 | int |
450 | main (int argc, char *argv[]) | 450 | main (int argc, char *argv[]) |
451 | { | 451 | { |
452 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
452 | res = 1; | 453 | res = 1; |
453 | if (0 != | 454 | if (0 != |
454 | GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration-stop", | 455 | GNUNET_TESTING_service_run ("test-namestore-api-zone-iteration-stop", |