@@ -307,9 +307,7 @@ static struct test_ctx *test_ctx_create(struct flb_lib_out_cb *data)
307307static struct test_ctx * test_ctx_create_with_config (struct flb_lib_out_cb * data ,
308308 const char * db_sync ,
309309 const char * db_locking ,
310- const char * db_journal_mode ,
311- const char * dns_retries ,
312- const char * dns_wait_time )
310+ const char * db_journal_mode )
313311{
314312 int i_ffd ;
315313 int o_ffd ;
@@ -361,14 +359,6 @@ static struct test_ctx *test_ctx_create_with_config(struct flb_lib_out_cb *data,
361359 ret = flb_input_set (ctx -> flb , i_ffd , "db.journal_mode" , db_journal_mode , NULL );
362360 TEST_CHECK (ret == 0 );
363361 }
364- if (dns_retries ) {
365- ret = flb_input_set (ctx -> flb , i_ffd , "dns_retries" , dns_retries , NULL );
366- TEST_CHECK (ret == 0 );
367- }
368- if (dns_wait_time ) {
369- ret = flb_input_set (ctx -> flb , i_ffd , "dns_wait_time" , dns_wait_time , NULL );
370- TEST_CHECK (ret == 0 );
371- }
372362
373363 /* Output */
374364 o_ffd = flb_output (ctx -> flb , (char * ) "lib" , (void * ) data );
@@ -539,9 +529,7 @@ void flb_test_config_db_sync_values()
539529 ctx = test_ctx_create_with_config (& cb_data ,
540530 sync_values [i ], /* db.sync */
541531 NULL , /* db.locking */
542- NULL , /* db.journal_mode */
543- NULL , /* dns_retries */
544- NULL ); /* dns_wait_time */
532+ NULL ); /* db.journal_mode */
545533 if (!TEST_CHECK (ctx != NULL )) {
546534 TEST_MSG ("test_ctx_create_with_config failed for db.sync=%s" , sync_values [i ]);
547535 continue ;
@@ -575,9 +563,7 @@ void flb_test_config_db_journal_mode_values()
575563 ctx = test_ctx_create_with_config (& cb_data ,
576564 NULL , /* db.sync */
577565 NULL , /* db.locking */
578- journal_modes [i ], /* db.journal_mode */
579- NULL , /* dns_retries */
580- NULL ); /* dns_wait_time */
566+ journal_modes [i ]); /* db.journal_mode */
581567 if (!TEST_CHECK (ctx != NULL )) {
582568 TEST_MSG ("test_ctx_create_with_config failed for db.journal_mode=%s" , journal_modes [i ]);
583569 continue ;
@@ -611,9 +597,7 @@ void flb_test_config_db_locking_values()
611597 ctx = test_ctx_create_with_config (& cb_data ,
612598 NULL , /* db.sync */
613599 locking_values [i ], /* db.locking */
614- NULL , /* db.journal_mode */
615- NULL , /* dns_retries */
616- NULL ); /* dns_wait_time */
600+ NULL ); /* db.journal_mode */
617601 if (!TEST_CHECK (ctx != NULL )) {
618602 TEST_MSG ("test_ctx_create_with_config failed for db.locking=%s" , locking_values [i ]);
619603 continue ;
@@ -631,46 +615,13 @@ void flb_test_config_db_locking_values()
631615 }
632616}
633617
634- /* Test dns_retries and dns_wait_time config */
635- void flb_test_config_dns_options ()
636- {
637- struct flb_lib_out_cb cb_data ;
638- struct test_ctx * ctx ;
639- int ret ;
640-
641- cb_data .cb = NULL ;
642- cb_data .data = NULL ;
643-
644- ctx = test_ctx_create_with_config (& cb_data ,
645- NULL , /* db.sync */
646- NULL , /* db.locking */
647- NULL , /* db.journal_mode */
648- "10" , /* dns_retries */
649- "60" ); /* dns_wait_time */
650- if (!TEST_CHECK (ctx != NULL )) {
651- TEST_MSG ("test_ctx_create_with_config failed for dns options" );
652- return ;
653- }
654-
655- ret = flb_start (ctx -> flb );
656- TEST_CHECK (ret == 0 );
657- if (ret != 0 ) {
658- TEST_MSG ("flb_start failed for dns options" );
659- }
660-
661- flb_stop (ctx -> flb );
662- flb_destroy (ctx -> flb );
663- flb_free (ctx );
664- }
665-
666618TEST_LIST = {
667619 {"events_v1_with_lastTimestamp" , flb_test_events_v1_with_lastTimestamp },
668620 {"events_v1_with_creationTimestamp" , flb_test_events_v1_with_creationTimestamp },
669621 //{"events_v1_with_chunkedrecv", flb_test_events_with_chunkedrecv},
670622 {"config_db_sync_values" , flb_test_config_db_sync_values },
671623 {"config_db_journal_mode_values" , flb_test_config_db_journal_mode_values },
672624 {"config_db_locking_values" , flb_test_config_db_locking_values },
673- {"config_dns_options" , flb_test_config_dns_options },
674625 {NULL , NULL }
675626};
676627
0 commit comments