From 21261c3322507e4fa9f7efdef248992055b833b4 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:54:24 +0000 Subject: [PATCH] Cleanup --- api/grpcserver/mesh_service_test.go | 2 -- api/grpcserver/v2alpha1/v2alpha1_test.go | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/grpcserver/mesh_service_test.go b/api/grpcserver/mesh_service_test.go index d87f0272619..988750b7cc8 100644 --- a/api/grpcserver/mesh_service_test.go +++ b/api/grpcserver/mesh_service_test.go @@ -251,14 +251,12 @@ func TestMeshService_MalfeasanceStream(t *testing.T) { id, proof := AtxMalfeasance(t, db) proofBytes := codec.MustEncode(proof) - require.NoError(t, identities.SetMalicious(db, id, proofBytes, time.Now())) events.ReportMalfeasance(id) resp, err := stream.Recv() require.NoError(t, err) require.Equal(t, toMalfeasancePB(id, proofBytes, false), resp.Proof) id, proof = BallotMalfeasance(t, db) proofBytes = codec.MustEncode(proof) - require.NoError(t, identities.SetMalicious(db, id, proofBytes, time.Now())) events.ReportMalfeasance(id) resp, err = stream.Recv() require.NoError(t, err) diff --git a/api/grpcserver/v2alpha1/v2alpha1_test.go b/api/grpcserver/v2alpha1/v2alpha1_test.go index fea6adf9abf..5851bc27169 100644 --- a/api/grpcserver/v2alpha1/v2alpha1_test.go +++ b/api/grpcserver/v2alpha1/v2alpha1_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.uber.org/zap" + "go.uber.org/zap/zaptest" "google.golang.org/grpc" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials/insecure" @@ -22,9 +22,7 @@ const ( func launchServer(tb testing.TB, services ...grpcserver.ServiceAPI) (grpcserver.Config, func()) { cfg := grpcserver.DefaultTestConfig() - // logger := zaptest.NewLogger(tb).Named("grpc") - logger := zap.NewNop() - grpc, err := grpcserver.NewWithServices(cfg.PublicListener, logger, cfg, services) + grpc, err := grpcserver.NewWithServices(cfg.PublicListener, zaptest.NewLogger(tb).Named("grpc"), cfg, services) require.NoError(tb, err) // start gRPC server