tsdb/agent: use unique registry per tests

So tests can run in parallel.

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
This commit is contained in:
Mateusz Gozdek 2021-11-10 11:46:01 +01:00 committed by Julien Pivotto
parent c08bb86be0
commit 83086aee00

View file

@ -39,7 +39,7 @@ func TestUnsupported(t *testing.T) {
opts := DefaultOptions() opts := DefaultOptions()
logger := log.NewNopLogger() logger := log.NewNopLogger()
s, err := Open(logger, prometheus.DefaultRegisterer, nil, promAgentDir, opts) s, err := Open(logger, prometheus.NewRegistry(), nil, promAgentDir, opts)
require.NoError(t, err) require.NoError(t, err)
defer func() { defer func() {
require.NoError(t, s.Close()) require.NoError(t, s.Close())