aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_store_update.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-11-28 08:10:19 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-11-28 08:10:19 +0000
commit55942930db8ad9c07d1ee5878bdb414495743c7f (patch)
treea729b931ac0af2fd2c5fd981866372cd66d9e04a /src/namestore/test_namestore_api_store_update.c
parent2e785bfc13a5e12559c1ceec0879891ce9601fe7 (diff)
downloadgnunet-55942930db8ad9c07d1ee5878bdb414495743c7f.tar.gz
gnunet-55942930db8ad9c07d1ee5878bdb414495743c7f.zip
- Tests did not clean up: TEST_HOME with namestore db was not removed after test
Therefore test_namestore_api_remove_not_existing_record passed when executed on a clean system, but failed if ran after a previous test adding a record - remove unused file namestore/test_namestore_api_put.c
Diffstat (limited to 'src/namestore/test_namestore_api_store_update.c')
-rw-r--r--src/namestore/test_namestore_api_store_update.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c
index b68d59a6b..213d934bf 100644
--- a/src/namestore/test_namestore_api_store_update.c
+++ b/src/namestore/test_namestore_api_store_update.c
@@ -63,6 +63,7 @@ static struct GNUNET_NAMECACHE_QueueEntry *ncqe;
63 63
64static const char *name = "dummy"; 64static const char *name = "dummy";
65 65
66static char *directory;
66 67
67static void 68static void
68cleanup () 69cleanup ()
@@ -82,6 +83,11 @@ cleanup ()
82 GNUNET_free (privkey); 83 GNUNET_free (privkey);
83 privkey = NULL; 84 privkey = NULL;
84 } 85 }
86 if (NULL != directory)
87 {
88 GNUNET_DISK_directory_remove (directory);
89 GNUNET_free (directory);
90 }
85 GNUNET_SCHEDULER_shutdown (); 91 GNUNET_SCHEDULER_shutdown ();
86} 92}
87 93
@@ -231,6 +237,9 @@ run (void *cls,
231 struct GNUNET_GNSRECORD_Data rd; 237 struct GNUNET_GNSRECORD_Data rd;
232 char *hostkey_file; 238 char *hostkey_file;
233 239
240 directory = NULL;
241 GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory);
242
234 update_performed = GNUNET_NO; 243 update_performed = GNUNET_NO;
235 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, 244 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
236 &endbadly, NULL); 245 &endbadly, NULL);