diff --git a/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go b/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go index e5862780cd5..6cbf85d235c 100644 --- a/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go +++ b/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go @@ -77,6 +77,12 @@ func TestDefaultProcessorStartup(t *testing.T) { return cgroup.NewReader(rootfsMountpoint, ignoreRootCgroups) } + defer func() { + initCgroupPaths = func(_ resolve.Resolver, _ bool) (processors.CGReader, error) { + return testCGReader{}, nil + } + }() + rawCfg := defaultConfig() cfg, err := config.NewConfigFrom(rawCfg) require.NoError(t, err)