X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Funit%2Fcore%2Fstore_json_test.c;h=baecf8053d1986576ee2cd4b42e7bcad3e010248;hp=ebb2daf1d22ec7cee81e267d97ca476612b5abe9;hb=9345a64b2fa015c30d6b3fcba76211f8d0d7cfd6;hpb=241d29da17792fb73dcb9c64043eb42d5268307b diff --git a/t/unit/core/store_json_test.c b/t/unit/core/store_json_test.c index ebb2daf..baecf80 100644 --- a/t/unit/core/store_json_test.c +++ b/t/unit/core/store_json_test.c @@ -29,6 +29,7 @@ # include "config.h" #endif +#include "core/plugin.h" #include "core/store.h" #include "testutils.h" @@ -46,41 +47,45 @@ populate(void) sdb_store_init(); - sdb_store_host("h1", 1 * SDB_INTERVAL_SECOND); - sdb_store_host("h2", 3 * SDB_INTERVAL_SECOND); + 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); /* make sure that older updates don't overwrite existing values */ datum.data.string = "fail"; - sdb_store_attribute("h1", "k2", &datum, 1 * SDB_INTERVAL_SECOND); - sdb_store_attribute("h1", "k3", &datum, 2 * SDB_INTERVAL_SECOND); + sdb_plugin_store_attribute("h1", "k2", &datum, 1 * 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); - 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.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); 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); /* don't overwrite k1 */ datum.data.integer = 666; - 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); } /* populate */ static int