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_shadow.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_shadow.c')
-rw-r--r-- | src/namestore/test_namestore_api_lookup_shadow.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/namestore/test_namestore_api_lookup_shadow.c b/src/namestore/test_namestore_api_lookup_shadow.c index 442d3eb1c..e77e9f2df 100644 --- a/src/namestore/test_namestore_api_lookup_shadow.c +++ b/src/namestore/test_namestore_api_lookup_shadow.c | |||
@@ -53,6 +53,7 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
53 | 53 | ||
54 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; | 54 | static struct GNUNET_NAMECACHE_QueueEntry *ncqe; |
55 | 55 | ||
56 | static char *directory; | ||
56 | 57 | ||
57 | static void | 58 | static void |
58 | cleanup () | 59 | cleanup () |
@@ -72,6 +73,11 @@ cleanup () | |||
72 | GNUNET_free (privkey); | 73 | GNUNET_free (privkey); |
73 | privkey = NULL; | 74 | privkey = NULL; |
74 | } | 75 | } |
76 | if (NULL != directory) | ||
77 | { | ||
78 | GNUNET_DISK_directory_remove (directory); | ||
79 | GNUNET_free (directory); | ||
80 | } | ||
75 | GNUNET_SCHEDULER_shutdown (); | 81 | GNUNET_SCHEDULER_shutdown (); |
76 | } | 82 | } |
77 | 83 | ||
@@ -225,6 +231,9 @@ run (void *cls, | |||
225 | char *hostkey_file; | 231 | char *hostkey_file; |
226 | const char * name = "dummy.dummy.gnunet"; | 232 | const char * name = "dummy.dummy.gnunet"; |
227 | 233 | ||
234 | directory = NULL; | ||
235 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | ||
236 | |||
228 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 237 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
229 | &endbadly, NULL); | 238 | &endbadly, NULL); |
230 | GNUNET_asprintf (&hostkey_file, | 239 | GNUNET_asprintf (&hostkey_file, |