diff --git a/plugin/storage/es/spanstore/reader_test.go b/plugin/storage/es/spanstore/reader_test.go index 7d4b2881d49..3b292008dcd 100644 --- a/plugin/storage/es/spanstore/reader_test.go +++ b/plugin/storage/es/spanstore/reader_test.go @@ -22,6 +22,7 @@ import ( "go.opentelemetry.io/otel/sdk/trace/tracetest" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" + "go.uber.org/zap/zaptest" "github.com/jaegertracing/jaeger/internal/metricstest" "github.com/jaegertracing/jaeger/model" @@ -167,7 +168,9 @@ func TestNewSpanReader(t *testing.T) { } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - reader := NewSpanReader(test.params) + params := test.params + params.Logger = zaptest.NewLogger(t) + reader := NewSpanReader(params) require.NotNil(t, reader) assert.Equal(t, test.maxSpanAge, reader.maxSpanAge) }) diff --git a/plugin/storage/es/spanstore/writer_test.go b/plugin/storage/es/spanstore/writer_test.go index 381f08271db..8781967a94b 100644 --- a/plugin/storage/es/spanstore/writer_test.go +++ b/plugin/storage/es/spanstore/writer_test.go @@ -146,12 +146,10 @@ func TestSpanWriter_WriteSpan(t *testing.T) { expectedLogs []string }{ { - caption: "span insertion error", - + caption: "span insertion error", serviceIndexExists: false, - - expectedError: "", - expectedLogs: []string{}, + expectedError: "", + expectedLogs: []string{"Wrote span to ES index"}, }, } for _, tc := range testCases {