-fix testcases
authorChristian Grothoff <christian@grothoff.org>
Thu, 17 Oct 2013 09:32:48 +0000 (09:32 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 17 Oct 2013 09:32:48 +0000 (09:32 +0000)
src/namestore/test_namestore_api_remove_not_existing_record.c
src/namestore/test_namestore_api_zone_iteration.c

index 0e7cc6b332b6dd57854c4b5cbc3a803bd25431d3..362a180824b6929e8607b8c24fe06435e63cdc93 100644 (file)
@@ -108,17 +108,6 @@ put_cont (void *cls, int32_t success, const char *emsg)
   }
   else if (GNUNET_OK == success)
   {
-    GNUNET_break (0);
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Namestore did remove not exisiting record: `%s'\n",
-                emsg);
-    GNUNET_SCHEDULER_shutdown ();
-    return;
-  }
-  else
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Name was not removed\n");
     res = 0;
     if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
     {
@@ -144,7 +133,9 @@ run (void *cls,
                   "zonefiles%s%s",
                   DIR_SEPARATOR_STR,
                   "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Using zonekey file `%s' \n",
+              hostkey_file);
   privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file (hostkey_file);
   GNUNET_free (hostkey_file);
   GNUNET_assert (privkey != NULL);
@@ -153,7 +144,8 @@ run (void *cls,
   nsh = GNUNET_NAMESTORE_connect (cfg);
   GNUNET_break (NULL != nsh);
   nsqe = GNUNET_NAMESTORE_records_store (nsh, privkey, name,
-                                     0, NULL, &put_cont, (void *) name);
+                                         0, NULL,
+                                         &put_cont, (void *) name);
   if (NULL == nsqe)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
index cfeceabe063e1e3f2cbf06b3bce4eeed104dd7d1..7ff21a39d11a4870f2fb09ca9ea3bbb390c4f413 100644 (file)
@@ -440,6 +440,7 @@ int
 main (int argc, char *argv[])
 {
   res = 1;
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore");
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration",
                                "test_namestore_api.conf",