summaryrefslogtreecommitdiffstats
path: root/exporting
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-05-28 17:45:07 +0300
committerGitHub <noreply@github.com>2020-05-28 17:45:07 +0300
commit6976ddca60dee93d3dcd95c022df5ae9158910b8 (patch)
treef16f09069250d5d78ed67b7a1d8d4f23389f8b56 /exporting
parentd11ec6f978e357d539a6ab06c97555ed5d25c04b (diff)
Fix exporting unit tests (#9183)
Diffstat (limited to 'exporting')
-rw-r--r--exporting/tests/test_exporting_engine.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/exporting/tests/test_exporting_engine.c b/exporting/tests/test_exporting_engine.c
index ba9cd1464a..30b8fd83bc 100644
--- a/exporting/tests/test_exporting_engine.c
+++ b/exporting/tests/test_exporting_engine.c
@@ -666,9 +666,6 @@ static void test_simple_connector_worker(void **state)
expect_value(__wrap_send_internal_metrics, instance, instance);
will_return(__wrap_send_internal_metrics, 0);
- expect_function_call(__wrap_info_int);
- expect_function_call(__wrap_info_int);
-
simple_connector_worker(instance);
assert_int_equal(stats->buffered_metrics, 0);
@@ -796,7 +793,7 @@ static void test_create_main_rusage_chart(void **state)
expect_string(rrdset_create_custom, id, "exporting_main_thread_cpu");
expect_value(rrdset_create_custom, name, NULL);
expect_string(rrdset_create_custom, family, "exporting");
- expect_value(rrdset_create_custom, context, NULL);
+ expect_string(rrdset_create_custom, context, "exporting_cpu_usage");
expect_string(rrdset_create_custom, units, "milliseconds/s");
expect_string(rrdset_create_custom, plugin, "exporting");
expect_value(rrdset_create_custom, module, NULL);
@@ -865,7 +862,7 @@ static void test_send_internal_metrics(void **state)
expect_string(rrdset_create_custom, id, "exporting_test_instance_metrics");
expect_value(rrdset_create_custom, name, NULL);
expect_string(rrdset_create_custom, family, "exporting_test_instance");
- expect_value(rrdset_create_custom, context, NULL);
+ expect_string(rrdset_create_custom, context, "exporting_buffer");
expect_string(rrdset_create_custom, units, "metrics");
expect_string(rrdset_create_custom, plugin, "exporting");
expect_value(rrdset_create_custom, module, NULL);
@@ -889,7 +886,7 @@ static void test_send_internal_metrics(void **state)
expect_string(rrdset_create_custom, id, "exporting_test_instance_bytes");
expect_value(rrdset_create_custom, name, NULL);
expect_string(rrdset_create_custom, family, "exporting_test_instance");
- expect_value(rrdset_create_custom, context, NULL);
+ expect_string(rrdset_create_custom, context, "exporting_data_size");
expect_string(rrdset_create_custom, units, "KiB");
expect_string(rrdset_create_custom, plugin, "exporting");
expect_value(rrdset_create_custom, module, NULL);
@@ -913,7 +910,7 @@ static void test_send_internal_metrics(void **state)
expect_string(rrdset_create_custom, id, "exporting_test_instance_ops");
expect_value(rrdset_create_custom, name, NULL);
expect_string(rrdset_create_custom, family, "exporting_test_instance");
- expect_value(rrdset_create_custom, context, NULL);
+ expect_string(rrdset_create_custom, context, "exporting_operations");
expect_string(rrdset_create_custom, units, "operations");
expect_string(rrdset_create_custom, plugin, "exporting");
expect_value(rrdset_create_custom, module, NULL);
@@ -937,7 +934,7 @@ static void test_send_internal_metrics(void **state)
expect_string(rrdset_create_custom, id, "exporting_test_instance_thread_cpu");
expect_value(rrdset_create_custom, name, NULL);
expect_string(rrdset_create_custom, family, "exporting_test_instance");
- expect_value(rrdset_create_custom, context, NULL);
+ expect_string(rrdset_create_custom, context, "exporting_instance");
expect_string(rrdset_create_custom, units, "milliseconds/s");
expect_string(rrdset_create_custom, plugin, "exporting");
expect_value(rrdset_create_custom, module, NULL);