aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_to_name.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-01 12:44:39 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-01 12:44:39 +0200
commita5e3e870f27c8ef3a3cd5d59a686a3050f9c64fb (patch)
tree6eec8a07a9a932d3c7b36f196ad01428e4f0ed63 /src/namestore/test_namestore_api_zone_to_name.c
parent8f2f5bc2ee8ebf9b059b7b7e3104f25c5c363458 (diff)
downloadgnunet-a5e3e870f27c8ef3a3cd5d59a686a3050f9c64fb.tar.gz
gnunet-a5e3e870f27c8ef3a3cd5d59a686a3050f9c64fb.zip
more extensive namestore tests for the non-sqlite plugins, with bugfixes
Diffstat (limited to 'src/namestore/test_namestore_api_zone_to_name.c')
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index 2bc7d34a3..5b088d90b 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -221,7 +221,7 @@ run (void *cls,
221 /* load privat key */ 221 /* load privat key */
222 { 222 {
223 char *zonekey_file; 223 char *zonekey_file;
224 224
225 GNUNET_asprintf (&zonekey_file, 225 GNUNET_asprintf (&zonekey_file,
226 "zonefiles%s%s", 226 "zonefiles%s%s",
227 DIR_SEPARATOR_STR, 227 DIR_SEPARATOR_STR,
@@ -242,13 +242,13 @@ run (void *cls,
242 sizeof (s_zone_value)); 242 sizeof (s_zone_value));
243 { 243 {
244 struct GNUNET_GNSRECORD_Data rd; 244 struct GNUNET_GNSRECORD_Data rd;
245 245
246 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; 246 rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
247 rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY; 247 rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
248 rd.data_size = sizeof (s_zone_value); 248 rd.data_size = sizeof (s_zone_value);
249 rd.data = &s_zone_value; 249 rd.data = &s_zone_value;
250 rd.flags = 0; 250 rd.flags = 0;
251 251
252 nsh = GNUNET_NAMESTORE_connect (cfg); 252 nsh = GNUNET_NAMESTORE_connect (cfg);
253 GNUNET_break (NULL != nsh); 253 GNUNET_break (NULL != nsh);
254 GNUNET_NAMESTORE_records_store (nsh, 254 GNUNET_NAMESTORE_records_store (nsh,
@@ -266,17 +266,24 @@ int
266main (int argc, 266main (int argc,
267 char *argv[]) 267 char *argv[])
268{ 268{
269 const char *plugin_name;
270 char *cfg_name;
271
269 (void) argc; 272 (void) argc;
270 (void) argv; 273 plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
274 GNUNET_asprintf (&cfg_name,
275 "test_namestore_api_%s.conf",
276 plugin_name);
271 res = 1; 277 res = 1;
272 if (0 != 278 if (0 !=
273 GNUNET_TESTING_peer_run ("test-namestore-api-zone-to-name", 279 GNUNET_TESTING_peer_run ("test-namestore-api-zone-to-name",
274 "test_namestore_api.conf", 280 cfg_name,
275 &run, 281 &run,
276 NULL)) 282 NULL))
277 { 283 {
278 res = 1; 284 res = 1;
279 } 285 }
286 GNUNET_free (cfg_name);
280 if (NULL != directory) 287 if (NULL != directory)
281 { 288 {
282 GNUNET_DISK_directory_remove (directory); 289 GNUNET_DISK_directory_remove (directory);