sensor: fixes for proof-of-work, test passes now
[oweals/gnunet.git] / src / sensor / test_gnunet-service-sensor_reporting.c
index 3905e887657246fcc063085018aa6b7d382d90c1..acb0e7165f14f9009ac1003b28b5aec5b2037df6 100644 (file)
@@ -96,27 +96,27 @@ struct TestPeer
 /**
  * Test name
  */
-const static char *testname = "test_gnunet-service-sensor_reporting";
+static const char *testname = "test_gnunet-service-sensor_reporting";
 
 /**
  * Name of GNUNET config file used in this test
  */
-const static char *cfg_filename = "test_gnunet-service-sensor_reporting.conf";
+static const char *cfg_filename = "test_gnunet-service-sensor_reporting.conf";
 
 /**
  * Test sensor name
  */
-const static char *sensor_name = "test-sensor-statistics";
+static const char *sensor_name = "test-sensor-statistics";
 
 /**
  * Path to read test sensor from
  */
-const static char *sensor_path_src = "test_sensors/test-sensor-statistics";
+static const char *sensor_path_src = "test_sensors/test-sensor-statistics";
 
 /**
  * Path to write new test sensor to
  */
-const static char *sensor_path_dest =
+static const char *sensor_path_dest =
     "/tmp/test-gnunet-service-sensor-reporting/test-sensor-statistics";
 
 /**
@@ -356,7 +356,11 @@ sensor_service_started (void *cls, struct GNUNET_TESTBED_Operation *op,
 {
   struct TestPeer *peer = cls;
 
-  GNUNET_assert (NULL == emsg);
+  if (NULL != emsg)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
+    GNUNET_assert (0);
+  }
   peer->sensor_op =
       GNUNET_TESTBED_service_connect (NULL, peer->testbed_peer, "sensor",
                                       &sensor_connect_cb, peer,
@@ -441,7 +445,11 @@ static void
 dashboard_started (void *cls, struct GNUNET_TESTBED_Operation *op,
                    const char *emsg)
 {
-  GNUNET_assert (NULL == emsg);
+  if (NULL != emsg)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ERROR: %s.\n", emsg);
+    GNUNET_assert (0);
+  }
   GNUNET_TESTBED_operation_done (op);
   /* Connect to peerstore service on first peer */
   peerstore_op =