Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Dec 19, 2024
1 parent 2a4d56b commit 21261c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions api/grpcserver/mesh_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions api/grpcserver/v2alpha1/v2alpha1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 21261c3

Please sign in to comment.