diff --git a/libbeat/autodiscover/providers/docker/config.go b/libbeat/autodiscover/providers/docker/config.go index d151eb3ab600..86ab487a15a6 100644 --- a/libbeat/autodiscover/providers/docker/config.go +++ b/libbeat/autodiscover/providers/docker/config.go @@ -43,7 +43,7 @@ type Config struct { CleanupTimeout time.Duration `config:"cleanup_timeout" validate:"positive"` } -// Public variable, so specific beats (as Filebeat) can set a different cleanup timeout if they need it. +// DefaultCleanupTimeout Public variable, so specific beats (as Filebeat) can set a different cleanup timeout if they need it. var DefaultCleanupTimeout time.Duration = 0 func defaultConfig() *Config { diff --git a/libbeat/autodiscover/providers/kubernetes/pod_test.go b/libbeat/autodiscover/providers/kubernetes/pod_test.go index aba244bad5a2..16613d5d7f4e 100644 --- a/libbeat/autodiscover/providers/kubernetes/pod_test.go +++ b/libbeat/autodiscover/providers/kubernetes/pod_test.go @@ -2196,8 +2196,10 @@ func TestPodEventer_Namespace_Node_Watcher(t *testing.T) { } for _, test := range tests { + t.Run(test.name, func(t *testing.T) { - config := conf.MustNewConfigFrom(&test.cfg) + testcfg := &test.cfg + config := conf.MustNewConfigFrom(testcfg) c := defaultConfig() err = config.Unpack(&c) assert.NoError(t, err)