From 2320a1c2f7eb948d17590703021b1352101c1011 Mon Sep 17 00:00:00 2001 From: Max Planck Date: Tue, 5 Sep 2023 10:21:06 -0400 Subject: [PATCH] REVERT THIS. test changing all jaeger to null --- agents/agents/guard/db/suite_test.go | 2 +- agents/testutil/simulated_backends_suite.go | 2 +- ethergo/submitter/suite_test.go | 15 ++++++++------- services/cctp-relayer/api/suite_test.go | 2 +- services/cctp-relayer/db/suite_test.go | 9 +++++---- services/cctp-relayer/relayer/suite_test.go | 7 ++++--- services/explorer/api/suite_test.go | 2 +- services/explorer/backfill/suite_test.go | 6 ++++-- services/explorer/consumer/suite_test.go | 8 +++++--- services/explorer/db/suite_test.go | 5 +++-- services/explorer/node/suite_test.go | 9 +++++---- services/omnirpc/client/suite_test.go | 11 ++++++----- services/omnirpc/proxy/suite_test.go | 5 +++-- services/omnirpc/testhelper/server.go | 7 ++++--- services/scribe/api/suite_test.go | 9 +++++---- services/scribe/backend/suite_test.go | 7 ++++--- services/scribe/client/client_test.go | 5 +++-- services/scribe/db/suite_test.go | 14 ++++++++------ services/scribe/service/indexer/suite_test.go | 7 ++++--- services/scribe/service/suite_test.go | 7 ++++--- services/scribe/testhelper/scribe.go | 5 +++-- 21 files changed, 82 insertions(+), 62 deletions(-) diff --git a/agents/agents/guard/db/suite_test.go b/agents/agents/guard/db/suite_test.go index 61fe370182..362d87a902 100644 --- a/agents/agents/guard/db/suite_test.go +++ b/agents/agents/guard/db/suite_test.go @@ -44,7 +44,7 @@ func (t *DBSuite) SetupSuite() { localmetrics.SetupTestJaeger(t.GetSuiteContext(), t.T()) var err error - t.metrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + t.metrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) Nil(t.T(), err) } diff --git a/agents/testutil/simulated_backends_suite.go b/agents/testutil/simulated_backends_suite.go index e95db977a5..6ece18dde5 100644 --- a/agents/testutil/simulated_backends_suite.go +++ b/agents/testutil/simulated_backends_suite.go @@ -158,7 +158,7 @@ func (a *SimulatedBackendsTestSuite) SetupSuite() { if useMetrics { localmetrics.SetupTestJaeger(a.GetSuiteContext(), a.T()) - metricsHandler = metrics.Jaeger + metricsHandler = metrics.Null } var err error diff --git a/ethergo/submitter/suite_test.go b/ethergo/submitter/suite_test.go index c207ba43cb..261df83d1d 100644 --- a/ethergo/submitter/suite_test.go +++ b/ethergo/submitter/suite_test.go @@ -4,6 +4,12 @@ import ( "context" "database/sql" "fmt" + "math/big" + "os" + "sync" + "testing" + "time" + "github.com/Flaque/filet" "github.com/brianvoe/gofakeit/v6" "github.com/ethereum/go-ethereum/accounts/keystore" @@ -31,11 +37,6 @@ import ( "gorm.io/driver/sqlite" "gorm.io/gorm" "gorm.io/gorm/schema" - "math/big" - "os" - "sync" - "testing" - "time" "github.com/stretchr/testify/suite" "github.com/synapsecns/sanguine/core/testsuite" @@ -92,7 +93,7 @@ func (s *SubmitterSuite) SetupSuite() { defer wg.Done() var err error localmetrics.SetupTestJaeger(s.GetSuiteContext(), s.T()) - s.metrics, err = metrics.NewByType(s.GetSuiteContext(), buildInfo, metrics.Jaeger) + s.metrics, err = metrics.NewByType(s.GetSuiteContext(), buildInfo, metrics.Null) s.Require().NoError(err) }() @@ -182,7 +183,7 @@ func (t *TXSubmitterDBSuite) SetupSuite() { t.TestSuite.SetupSuite() localmetrics.SetupTestJaeger(t.GetSuiteContext(), t.T()) var err error - t.metrics, err = metrics.NewByType(t.GetSuiteContext(), buildInfo, metrics.Jaeger) + t.metrics, err = metrics.NewByType(t.GetSuiteContext(), buildInfo, metrics.Null) t.Require().NoError(err) } diff --git a/services/cctp-relayer/api/suite_test.go b/services/cctp-relayer/api/suite_test.go index e212ff4aef..68c12ac2e8 100644 --- a/services/cctp-relayer/api/suite_test.go +++ b/services/cctp-relayer/api/suite_test.go @@ -41,7 +41,7 @@ func (s *RelayerAPISuite) SetupTest() { // create the test metrics handler var err error - s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Jaeger) + s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Null) s.Require().NoError(err) // create the test store diff --git a/services/cctp-relayer/db/suite_test.go b/services/cctp-relayer/db/suite_test.go index de431752c6..09996669fc 100644 --- a/services/cctp-relayer/db/suite_test.go +++ b/services/cctp-relayer/db/suite_test.go @@ -3,6 +3,10 @@ package db_test import ( dbSQL "database/sql" "fmt" + "os" + "sync" + "testing" + "github.com/Flaque/filet" . "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" @@ -15,9 +19,6 @@ import ( "github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/mysql" "github.com/synapsecns/sanguine/services/cctp-relayer/metadata" "gorm.io/gorm/schema" - "os" - "sync" - "testing" ) type DBSuite struct { @@ -40,7 +41,7 @@ func (d *DBSuite) SetupSuite() { localmetrics.SetupTestJaeger(d.GetSuiteContext(), d.T()) var err error - d.metrics, err = metrics.NewByType(d.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + d.metrics, err = metrics.NewByType(d.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) Nil(d.T(), err) } diff --git a/services/cctp-relayer/relayer/suite_test.go b/services/cctp-relayer/relayer/suite_test.go index 49dc551884..5dae0ef343 100644 --- a/services/cctp-relayer/relayer/suite_test.go +++ b/services/cctp-relayer/relayer/suite_test.go @@ -3,13 +3,14 @@ package relayer_test import ( "fmt" - "github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/base" - "github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/sqlite" "math/big" "net/url" "strconv" "testing" + "github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/base" + "github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/sqlite" + "github.com/Flaque/filet" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" @@ -164,7 +165,7 @@ func (s *CCTPRelayerSuite) SetupTest() { // create the test metrics handler var err error - s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Jaeger) + s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Null) s.Require().NoError(err) // create the test store diff --git a/services/explorer/api/suite_test.go b/services/explorer/api/suite_test.go index 9d0d9377ea..bae694644b 100644 --- a/services/explorer/api/suite_test.go +++ b/services/explorer/api/suite_test.go @@ -189,7 +189,7 @@ func (g *APISuite) SetupSuite() { localmetrics.SetupTestJaeger(g.GetSuiteContext(), g.T()) var err error - g.scribeMetrics, err = metrics.NewByType(g.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Jaeger) + g.scribeMetrics, err = metrics.NewByType(g.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Null) g.Require().Nil(err) // TODO: there may be an issue w/ syncer for local test nevs, investigate, but this probably comes from heavy load ending every span of every field synchronously g.explorerMetrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) diff --git a/services/explorer/backfill/suite_test.go b/services/explorer/backfill/suite_test.go index bde9cc418d..73a3b59643 100644 --- a/services/explorer/backfill/suite_test.go +++ b/services/explorer/backfill/suite_test.go @@ -2,6 +2,7 @@ package backfill_test import ( "fmt" + "github.com/brianvoe/gofakeit/v6" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -21,9 +22,10 @@ import ( scribedb "github.com/synapsecns/sanguine/services/scribe/db" "github.com/synapsecns/sanguine/services/scribe/metadata" - "go.uber.org/atomic" "math/big" "testing" + + "go.uber.org/atomic" ) type BackfillSuite struct { @@ -55,7 +57,7 @@ func (b *BackfillSuite) SetupSuite() { localmetrics.SetupTestJaeger(b.GetSuiteContext(), b.T()) var err error - b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) b.Require().Nil(err) } diff --git a/services/explorer/consumer/suite_test.go b/services/explorer/consumer/suite_test.go index 46276ea4ea..e9a3f4fe5d 100644 --- a/services/explorer/consumer/suite_test.go +++ b/services/explorer/consumer/suite_test.go @@ -2,6 +2,7 @@ package consumer_test import ( "fmt" + "github.com/brianvoe/gofakeit/v6" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -15,13 +16,14 @@ import ( "github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig" "github.com/synapsecns/sanguine/services/explorer/db" + "math/big" + "testing" + "github.com/synapsecns/sanguine/services/explorer/testutil" "github.com/synapsecns/sanguine/services/explorer/testutil/testcontracts" scribedb "github.com/synapsecns/sanguine/services/scribe/db" "github.com/synapsecns/sanguine/services/scribe/metadata" "go.uber.org/atomic" - "math/big" - "testing" ) // ConsumerSuite is the config test suite. @@ -99,7 +101,7 @@ func (c *ConsumerSuite) SetupSuite() { c.TestSuite.SetupSuite() var err error - c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) c.Require().Nil(err) } diff --git a/services/explorer/db/suite_test.go b/services/explorer/db/suite_test.go index 5c623a095e..674ddf1157 100644 --- a/services/explorer/db/suite_test.go +++ b/services/explorer/db/suite_test.go @@ -1,6 +1,8 @@ package db_test import ( + "testing" + "github.com/stretchr/testify/suite" "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" @@ -12,7 +14,6 @@ import ( scribedb "github.com/synapsecns/sanguine/services/scribe/db" "github.com/synapsecns/sanguine/services/scribe/metadata" "go.uber.org/atomic" - "testing" ) type DBSuite struct { @@ -41,7 +42,7 @@ func (t *DBSuite) SetupTest() { localmetrics.SetupTestJaeger(t.GetSuiteContext(), t.T()) var err error - t.scribeMetrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + t.scribeMetrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) t.Require().Nil(err) t.db, t.eventDB, t.gqlClient, t.logIndex, t.cleanup, t.testBackend, t.deployManager = testutil.NewTestEnvDB(t.GetTestContext(), t.T(), t.scribeMetrics) } diff --git a/services/explorer/node/suite_test.go b/services/explorer/node/suite_test.go index 43eda0e610..bf4cc364c9 100644 --- a/services/explorer/node/suite_test.go +++ b/services/explorer/node/suite_test.go @@ -2,6 +2,9 @@ package node_test import ( "fmt" + "math/big" + "testing" + "github.com/ethereum/go-ethereum/common" "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" @@ -12,8 +15,6 @@ import ( "github.com/synapsecns/sanguine/services/explorer/testutil/testcontracts" scribedb "github.com/synapsecns/sanguine/services/scribe/db" scribeMetadata "github.com/synapsecns/sanguine/services/scribe/metadata" - "math/big" - "testing" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/suite" @@ -88,9 +89,9 @@ func (c *NodeSuite) SetupSuite() { localmetrics.SetupTestJaeger(c.GetSuiteContext(), c.T()) var err error - c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Jaeger) + c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Null) c.Require().Nil(err) - c.explorerMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + c.explorerMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) c.Require().Nil(err) } diff --git a/services/omnirpc/client/suite_test.go b/services/omnirpc/client/suite_test.go index 6e321b47c4..f84b84f6bf 100644 --- a/services/omnirpc/client/suite_test.go +++ b/services/omnirpc/client/suite_test.go @@ -3,6 +3,11 @@ package client_test import ( "context" "fmt" + "math/big" + "net/url" + "sync" + "testing" + "github.com/stretchr/testify/suite" "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" @@ -13,10 +18,6 @@ import ( "github.com/synapsecns/sanguine/services/omnirpc/metadata" "github.com/synapsecns/sanguine/services/omnirpc/testhelper" "golang.org/x/sync/errgroup" - "math/big" - "net/url" - "sync" - "testing" ) type TestClientSuite struct { @@ -69,7 +70,7 @@ func (s *TestClientSuite) SetupJaeger() { localmetrics.SetupTestJaeger(s.GetSuiteContext(), s.T()) var err error - s.metrics, err = metrics.NewByType(s.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + s.metrics, err = metrics.NewByType(s.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) s.Require().Nil(err) } diff --git a/services/omnirpc/proxy/suite_test.go b/services/omnirpc/proxy/suite_test.go index 7aac3584f1..c8553c0dc8 100644 --- a/services/omnirpc/proxy/suite_test.go +++ b/services/omnirpc/proxy/suite_test.go @@ -1,13 +1,14 @@ package proxy_test import ( + "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" "github.com/synapsecns/sanguine/core/testsuite" "github.com/synapsecns/sanguine/services/omnirpc/metadata" - "testing" ) type ProxySuite struct { @@ -29,7 +30,7 @@ func (p *ProxySuite) SetupSuite() { localmetrics.SetupTestJaeger(p.GetSuiteContext(), p.T()) var err error - p.metrics, err = metrics.NewByType(p.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + p.metrics, err = metrics.NewByType(p.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) assert.Nil(p.T(), err) } diff --git a/services/omnirpc/testhelper/server.go b/services/omnirpc/testhelper/server.go index 3e1895f13f..293424c24e 100644 --- a/services/omnirpc/testhelper/server.go +++ b/services/omnirpc/testhelper/server.go @@ -3,6 +3,9 @@ package testhelper import ( "context" "fmt" + "net/http" + "testing" + "github.com/phayes/freeport" "github.com/stretchr/testify/assert" "github.com/synapsecns/sanguine/core/ginhelper" @@ -14,8 +17,6 @@ import ( omniHTTP "github.com/synapsecns/sanguine/services/omnirpc/http" "github.com/synapsecns/sanguine/services/omnirpc/metadata" "github.com/synapsecns/sanguine/services/omnirpc/proxy" - "net/http" - "testing" ) func makeConfig(backends []backends.SimulatedTestBackend, clientType omniHTTP.ClientType) config.Config { @@ -46,7 +47,7 @@ func NewOmnirpcServer(ctx context.Context, tb testing.TB, backends ...backends.S localmetrics.SetupTestJaeger(ctx, tb) - handler, err := metrics.NewByType(ctx, metadata.BuildInfo(), metrics.Jaeger) + handler, err := metrics.NewByType(ctx, metadata.BuildInfo(), metrics.Null) assert.Nil(tb, err) server := proxy.NewProxy(makeConfig(backends, omniHTTP.FastHTTP), handler) diff --git a/services/scribe/api/suite_test.go b/services/scribe/api/suite_test.go index 1494b3297a..34724c1b69 100644 --- a/services/scribe/api/suite_test.go +++ b/services/scribe/api/suite_test.go @@ -2,6 +2,10 @@ package api_test import ( "fmt" + "net/http" + "testing" + "time" + "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" "github.com/synapsecns/sanguine/services/scribe/api" @@ -10,9 +14,6 @@ import ( "github.com/synapsecns/sanguine/services/scribe/metadata" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "net/http" - "testing" - "time" "github.com/Flaque/filet" "github.com/phayes/freeport" @@ -54,7 +55,7 @@ func (g *APISuite) SetupSuite() { localmetrics.SetupTestJaeger(g.GetSuiteContext(), g.T()) var err error - g.metrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + g.metrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) g.Require().Nil(err) } diff --git a/services/scribe/backend/suite_test.go b/services/scribe/backend/suite_test.go index 3eb8503c04..e0ae445cdc 100644 --- a/services/scribe/backend/suite_test.go +++ b/services/scribe/backend/suite_test.go @@ -1,11 +1,12 @@ package backend_test import ( + "testing" + "time" + "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" "github.com/synapsecns/sanguine/services/scribe/metadata" - "testing" - "time" "github.com/Flaque/filet" . "github.com/stretchr/testify/assert" @@ -53,7 +54,7 @@ func (b *BackendSuite) SetupSuite() { localmetrics.SetupTestJaeger(b.GetSuiteContext(), b.T()) var err error - b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) Nil(b.T(), err) } diff --git a/services/scribe/client/client_test.go b/services/scribe/client/client_test.go index abac091c81..089f93b733 100644 --- a/services/scribe/client/client_test.go +++ b/services/scribe/client/client_test.go @@ -2,6 +2,8 @@ package client_test import ( "fmt" + "testing" + "github.com/Flaque/filet" . "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" @@ -13,7 +15,6 @@ import ( "github.com/synapsecns/sanguine/services/scribe/metadata" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "testing" ) // ClientSuite defines the basic test suite. @@ -44,7 +45,7 @@ func (g *ClientSuite) SetupSuite() { localmetrics.SetupTestJaeger(g.GetSuiteContext(), g.T()) var err error - g.metrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + g.metrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) g.Require().Nil(err) } diff --git a/services/scribe/db/suite_test.go b/services/scribe/db/suite_test.go index b638ec908f..9d483ea5f0 100644 --- a/services/scribe/db/suite_test.go +++ b/services/scribe/db/suite_test.go @@ -3,17 +3,18 @@ package db_test import ( "database/sql" "fmt" + "os" + "sync" + "sync/atomic" + "testing" + "time" + "github.com/synapsecns/sanguine/core/dbcommon" "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" "github.com/synapsecns/sanguine/core/testsuite" "github.com/synapsecns/sanguine/services/scribe/db" "github.com/synapsecns/sanguine/services/scribe/metadata" - "os" - "sync" - "sync/atomic" - "testing" - "time" "github.com/Flaque/filet" . "github.com/stretchr/testify/assert" @@ -56,7 +57,8 @@ func (t *DBSuite) SetupSuite() { localmetrics.SetupTestJaeger(t.GetSuiteContext(), t.T()) var err error - t.scribeMetrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + t.scribeMetrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) + t.Require().Nil(err) } diff --git a/services/scribe/service/indexer/suite_test.go b/services/scribe/service/indexer/suite_test.go index ef6b11c148..be5cf2387d 100644 --- a/services/scribe/service/indexer/suite_test.go +++ b/services/scribe/service/indexer/suite_test.go @@ -1,11 +1,12 @@ package indexer_test import ( + "testing" + "time" + "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" "github.com/synapsecns/sanguine/services/scribe/metadata" - "testing" - "time" "github.com/Flaque/filet" . "github.com/stretchr/testify/assert" @@ -53,7 +54,7 @@ func (x *IndexerSuite) SetupSuite() { localmetrics.SetupTestJaeger(x.GetSuiteContext(), x.T()) var err error - x.metrics, err = metrics.NewByType(x.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + x.metrics, err = metrics.NewByType(x.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) Nil(x.T(), err) } diff --git a/services/scribe/service/suite_test.go b/services/scribe/service/suite_test.go index 9fd29145dd..d9b8c28d0b 100644 --- a/services/scribe/service/suite_test.go +++ b/services/scribe/service/suite_test.go @@ -1,11 +1,12 @@ package service_test import ( + "testing" + "time" + "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" "github.com/synapsecns/sanguine/services/scribe/metadata" - "testing" - "time" "github.com/Flaque/filet" . "github.com/stretchr/testify/assert" @@ -56,7 +57,7 @@ func (s *ScribeSuite) SetupSuite() { localmetrics.SetupTestJaeger(s.GetSuiteContext(), s.T()) var err error - s.metrics, err = metrics.NewByType(s.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger) + s.metrics, err = metrics.NewByType(s.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) Nil(s.T(), err) s.nullMetrics, err = metrics.NewByType(s.GetSuiteContext(), metadata.BuildInfo(), metrics.Null) diff --git a/services/scribe/testhelper/scribe.go b/services/scribe/testhelper/scribe.go index b67af9c3bf..c1e91e9c7c 100644 --- a/services/scribe/testhelper/scribe.go +++ b/services/scribe/testhelper/scribe.go @@ -3,6 +3,8 @@ package testhelper import ( "context" "fmt" + "testing" + "github.com/Flaque/filet" "github.com/ipfs/go-log" "github.com/stretchr/testify/assert" @@ -17,7 +19,6 @@ import ( "github.com/synapsecns/sanguine/services/scribe/config" "github.com/synapsecns/sanguine/services/scribe/metadata" "github.com/synapsecns/sanguine/services/scribe/service" - "testing" ) var logger = log.Logger("scribe-testhelper") @@ -33,7 +34,7 @@ func NewTestScribe(ctx context.Context, tb testing.TB, deployedContracts map[uin omnirpcURL := testhelper.NewOmnirpcServer(ctx, tb, backends...) localmetrics.SetupTestJaeger(ctx, tb) - metricsProvider, err := metrics.NewByType(ctx, metadata.BuildInfo(), metrics.Jaeger) + metricsProvider, err := metrics.NewByType(ctx, metadata.BuildInfo(), metrics.Null) assert.Nil(tb, err) eventDB, err := scribeAPI.InitDB(ctx, "sqlite", dbPath, metricsProvider, false)