diff --git a/libbeat/publisher/processing/default_test.go b/libbeat/publisher/processing/default_test.go index b4fe1d0bb67..3e4c6798fa5 100644 --- a/libbeat/publisher/processing/default_test.go +++ b/libbeat/publisher/processing/default_test.go @@ -32,6 +32,7 @@ import ( "github.com/elastic/beats/v7/libbeat/processors/actions/addfields" "github.com/elastic/elastic-agent-libs/config" "github.com/elastic/elastic-agent-libs/logp" + "github.com/elastic/elastic-agent-libs/logp/logptest" "github.com/elastic/elastic-agent-libs/mapstr" _ "github.com/elastic/beats/v7/libbeat/processors/add_cloud_metadata" @@ -51,10 +52,12 @@ func TestGenerateProcessorList(t *testing.T) { plugins, err := processors.NewPluginConfigFromList(inputCfg) require.NoError(t, err) - processors, err := processors.New(plugins, logp.NewNopLogger()) + processors, err := processors.New(plugins, logptest.NewTestingLogger(t, "")) require.NoError(t, err) // make sure the processor init got the config formatted in a way it expected require.Equal(t, 4, len(processors.List)) + + require.NoError(t, processors.Close()) } func TestProcessorsConfigs(t *testing.T) {