From 4dd7d6d99cfc4a20d20fa98fac29edc6efcd80f6 Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Mon, 25 Sep 2023 17:28:08 +0200 Subject: [PATCH] tests: internal: sp: added environment initialization calls Signed-off-by: Leonardo Alminana --- tests/internal/stream_processor.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/internal/stream_processor.c b/tests/internal/stream_processor.c index 44e983a0689..9afda0bf545 100644 --- a/tests/internal/stream_processor.c +++ b/tests/internal/stream_processor.c @@ -18,6 +18,7 @@ * limitations under the License. */ +#include #include #include #include @@ -200,6 +201,8 @@ static void invalid_queries() struct flb_sp *sp; struct flb_sp_task *task; + flb_init_env(); + /* Total number of checks for invalid queries */ checks = sizeof(invalid_query_checks) / sizeof(char *); @@ -244,6 +247,8 @@ static void test_select_keys() WSADATA wsa_data; #endif + flb_init_env(); + config = flb_calloc(1, sizeof(struct flb_config)); if (!config) { flb_errno(); @@ -330,6 +335,8 @@ static void test_select_subkeys() WSADATA wsa_data; #endif + flb_init_env(); + config = flb_calloc(1, sizeof(struct flb_config)); if (!config) { flb_errno(); @@ -458,6 +465,8 @@ static void test_window() WSADATA wsa_data; #endif + flb_init_env(); + config = flb_calloc(1, sizeof(struct flb_config)); if (!config) { flb_errno(); @@ -639,6 +648,8 @@ static void test_snapshot() WSADATA wsa_data; #endif + flb_init_env(); + config = flb_calloc(1, sizeof(struct flb_config)); if (!config) { flb_errno(); @@ -800,6 +811,8 @@ static void test_conv_from_str_to_num() #endif out_buf.buffer = NULL; + flb_init_env(); + config = flb_config_init(); config->evl = mk_event_loop_create(256);