@cryptotaxi247 / netdata-1 / commits / 6976ddca6

Fix exporting unit tests (#9183)

Vladimir Kobal committed May 28, 2020 at 17:45 UTC 6976ddca60dee93d3dcd95c022df5ae9158910b8
1 file changed +5 -8
exporting/tests/test_exporting_engine.c
+5 -8
@@ -666,9 +666,6 @@ static void test_simple_connector_worker(void **state)
666 expect_value(__wrap_send_internal_metrics, instance, instance);
667 will_return(__wrap_send_internal_metrics, 0);
668
669 - expect_function_call(__wrap_info_int);
670 - expect_function_call(__wrap_info_int);
671 -
669 simple_connector_worker(instance);
670
671 assert_int_equal(stats->buffered_metrics, 0);
@@ -796,7 +793,7 @@ static void test_create_main_rusage_chart(void **state)
793 expect_string(rrdset_create_custom, id, "exporting_main_thread_cpu");
794 expect_value(rrdset_create_custom, name, NULL);
795 expect_string(rrdset_create_custom, family, "exporting");
799 - expect_value(rrdset_create_custom, context, NULL);
796 + expect_string(rrdset_create_custom, context, "exporting_cpu_usage");
797 expect_string(rrdset_create_custom, units, "milliseconds/s");
798 expect_string(rrdset_create_custom, plugin, "exporting");
799 expect_value(rrdset_create_custom, module, NULL);
@@ -865,7 +862,7 @@ static void test_send_internal_metrics(void **state)
862 expect_string(rrdset_create_custom, id, "exporting_test_instance_metrics");
863 expect_value(rrdset_create_custom, name, NULL);
864 expect_string(rrdset_create_custom, family, "exporting_test_instance");
868 - expect_value(rrdset_create_custom, context, NULL);
865 + expect_string(rrdset_create_custom, context, "exporting_buffer");
866 expect_string(rrdset_create_custom, units, "metrics");
867 expect_string(rrdset_create_custom, plugin, "exporting");
868 expect_value(rrdset_create_custom, module, NULL);
@@ -889,7 +886,7 @@ static void test_send_internal_metrics(void **state)
886 expect_string(rrdset_create_custom, id, "exporting_test_instance_bytes");
887 expect_value(rrdset_create_custom, name, NULL);
888 expect_string(rrdset_create_custom, family, "exporting_test_instance");
892 - expect_value(rrdset_create_custom, context, NULL);
889 + expect_string(rrdset_create_custom, context, "exporting_data_size");
890 expect_string(rrdset_create_custom, units, "KiB");
891 expect_string(rrdset_create_custom, plugin, "exporting");
892 expect_value(rrdset_create_custom, module, NULL);
@@ -913,7 +910,7 @@ static void test_send_internal_metrics(void **state)
910 expect_string(rrdset_create_custom, id, "exporting_test_instance_ops");
911 expect_value(rrdset_create_custom, name, NULL);
912 expect_string(rrdset_create_custom, family, "exporting_test_instance");
916 - expect_value(rrdset_create_custom, context, NULL);
913 + expect_string(rrdset_create_custom, context, "exporting_operations");
914 expect_string(rrdset_create_custom, units, "operations");
915 expect_string(rrdset_create_custom, plugin, "exporting");
916 expect_value(rrdset_create_custom, module, NULL);
@@ -937,7 +934,7 @@ static void test_send_internal_metrics(void **state)
934 expect_string(rrdset_create_custom, id, "exporting_test_instance_thread_cpu");
935 expect_value(rrdset_create_custom, name, NULL);
936 expect_string(rrdset_create_custom, family, "exporting_test_instance");
940 - expect_value(rrdset_create_custom, context, NULL);
937 + expect_string(rrdset_create_custom, context, "exporting_instance");
938 expect_string(rrdset_create_custom, units, "milliseconds/s");
939 expect_string(rrdset_create_custom, plugin, "exporting");
940 expect_value(rrdset_create_custom, module, NULL);