diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-11-28 08:10:19 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-11-28 08:10:19 +0000 |
commit | 55942930db8ad9c07d1ee5878bdb414495743c7f (patch) | |
tree | a729b931ac0af2fd2c5fd981866372cd66d9e04a /src/namestore/test_namestore_api_lookup_public.c | |
parent | 2e785bfc13a5e12559c1ceec0879891ce9601fe7 (diff) | |
download | gnunet-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_lookup_public.c')
-rw-r--r-- | src/namestore/test_namestore_api_lookup_public.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/namestore/test_namestore_api_lookup_public.c b/src/namestore/test_namestore_api_lookup_public.c index a0678ddc4..096e5e055 100644 --- a/src/namestore/test_namestore_api_lookup_public.c +++ b/src/namestore/test_namestore_api_lookup_public.c | |||
@@ -51,6 +51,7 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
51 | 51 | ||
52 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; | 52 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; |
53 | 53 | ||
54 | static char *directory; | ||
54 | 55 | ||
55 | static void | 56 | static void |
56 | cleanup () | 57 | cleanup () |
@@ -70,6 +71,11 @@ cleanup () | |||
70 | GNUNET_free (privkey); | 71 | GNUNET_free (privkey); |
71 | privkey = NULL; | 72 | privkey = NULL; |
72 | } | 73 | } |
74 | if (NULL != directory) | ||
75 | { | ||
76 | GNUNET_DISK_directory_remove (directory); | ||
77 | GNUNET_free (directory); | ||
78 | } | ||
73 | GNUNET_SCHEDULER_shutdown (); | 79 | GNUNET_SCHEDULER_shutdown (); |
74 | } | 80 | } |
75 | 81 | ||
@@ -193,6 +199,9 @@ run (void *cls, | |||
193 | char *hostkey_file; | 199 | char *hostkey_file; |
194 | const char * name = "dummy.dummy.gnunet"; | 200 | const char * name = "dummy.dummy.gnunet"; |
195 | 201 | ||
202 | directory = NULL; | ||
203 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
204 | |||
196 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 205 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
197 | &endbadly, NULL); | 206 | &endbadly, NULL); |
198 | GNUNET_asprintf (&hostkey_file, | 207 | GNUNET_asprintf (&hostkey_file, |