Skip to content

Commit

Permalink
diagnostics: fix test db creation (#10497)
Browse files Browse the repository at this point in the history
Added new constructor for diagnostics client to avoid DB creation while
run test
  • Loading branch information
dvovk authored May 27, 2024
1 parent da84730 commit 2c70256
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions erigon-lib/diagnostics/snapshots_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
package diagnostics_test

import (
"context"
"testing"

"github.com/ledgerwatch/erigon-lib/diagnostics"
"github.com/stretchr/testify/require"
)

func NewTestDiagnosticClient() (*diagnostics.DiagnosticClient, error) {
return &diagnostics.DiagnosticClient{}, nil
}

func TestUpdateFileDownloadingStats(t *testing.T) {
d, err := diagnostics.NewDiagnosticClient(context.TODO(), nil, "test", true)
d, err := NewTestDiagnosticClient()

require.NoError(t, err)

Expand Down

0 comments on commit 2c70256

Please sign in to comment.