Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Jul 13, 2024
1 parent 9ee1862 commit a517dc8
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions cmd/query/app/http_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"go.uber.org/zap/zaptest"
"go.uber.org/zap/zaptest/observer"

Expand Down Expand Up @@ -174,27 +173,6 @@ func TestGetTraceSuccess(t *testing.T) {
assert.Empty(t, response.Errors)
}

type logData struct {
e zapcore.Entry
f []zapcore.Field
}

type testLogger struct {
logs *[]logData
}

func (testLogger) Enabled(zapcore.Level) bool { return true }
func (l testLogger) With([]zapcore.Field) zapcore.Core { return l }
func (testLogger) Sync() error { return nil }
func (l testLogger) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry {
return ce.AddCore(e, l)
}

func (l testLogger) Write(e zapcore.Entry, f []zapcore.Field) error {
*l.logs = append(*l.logs, logData{e: e, f: f})
return nil
}

func TestLogOnServerError(t *testing.T) {
zapCore, logs := observer.New(zap.InfoLevel)
logger := zap.New(zapCore)
Expand Down

0 comments on commit a517dc8

Please sign in to comment.