index 8872e5b6e13a0f2879430e20e65f7c7f1bf27ebf..7fb73a453f33dc7bf84a8989557f8c9470f93b10 100644 (file)
# include "config.h"
#endif
+#include "core/plugin.h"
#include "frontend/connection.h"
#include "frontend/connection-private.h"
#include "testutils.h"
{
sdb_data_t datum;
- sdb_store_host("h1", 1 * SDB_INTERVAL_SECOND);
- sdb_store_host("h2", 3 * SDB_INTERVAL_SECOND);
+ sdb_store_init();
+
+ sdb_plugin_store_host("h1", 1 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_host("h2", 3 * SDB_INTERVAL_SECOND);
datum.type = SDB_TYPE_STRING;
datum.data.string = "v1";
- sdb_store_attribute("h1", "k1", &datum, 1 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_attribute("h1", "k1", &datum, 1 * SDB_INTERVAL_SECOND);
datum.data.string = "v2";
- sdb_store_attribute("h1", "k2", &datum, 2 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_attribute("h1", "k2", &datum, 2 * SDB_INTERVAL_SECOND);
datum.data.string = "v3";
- sdb_store_attribute("h1", "k3", &datum, 2 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_attribute("h1", "k3", &datum, 2 * SDB_INTERVAL_SECOND);
- sdb_store_metric("h1", "m1", /* store */ NULL, 2 * SDB_INTERVAL_SECOND);
- sdb_store_metric("h1", "m2", /* store */ NULL, 1 * SDB_INTERVAL_SECOND);
- sdb_store_metric("h2", "m1", /* store */ NULL, 1 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_metric("h1", "m1", /* store */ NULL, 2 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_metric("h1", "m2", /* store */ NULL, 1 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_metric("h2", "m1", /* store */ NULL, 1 * SDB_INTERVAL_SECOND);
datum.type = SDB_TYPE_INTEGER;
datum.data.integer = 42;
- sdb_store_metric_attr("h1", "m1", "k3", &datum, 2 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_metric_attribute("h1", "m1", "k3",
+ &datum, 2 * SDB_INTERVAL_SECOND);
- sdb_store_service("h2", "s1", 1 * SDB_INTERVAL_SECOND);
- sdb_store_service("h2", "s2", 2 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_service("h2", "s1", 1 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_service("h2", "s2", 2 * SDB_INTERVAL_SECOND);
datum.data.integer = 123;
- sdb_store_service_attr("h2", "s2", "k1", &datum, 2 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_service_attribute("h2", "s2", "k1",
+ &datum, 2 * SDB_INTERVAL_SECOND);
datum.data.integer = 4711;
- sdb_store_service_attr("h2", "s2", "k2", &datum, 1 * SDB_INTERVAL_SECOND);
+ sdb_plugin_store_service_attribute("h2", "s2", "k2",
+ &datum, 1 * SDB_INTERVAL_SECOND);
} /* populate */
#define HOST_H1 \
const char *data;
ssize_t tmp;
size_t len;
- int check;
+ int check = -1;
conn->cmd = query_data[_i].cmd;
if (query_data[_i].query_len < 0)