Skip to content

Commit

Permalink
feat(ci): add ci badge (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzy9607 authored Nov 24, 2024
1 parent c8b0d01 commit 2571ca9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# goredisotel

[![ci](https://github.com/wzy9607/goredisotel/actions/workflows/pull-request.yml/badge.svg)](https://github.com/wzy9607/goredisotel/actions/workflows/pull-request.yml)
[![codecov](https://codecov.io/gh/wzy9607/goredisotel/graph/badge.svg?token=VVMWEWOQFO)](https://codecov.io/gh/wzy9607/goredisotel)

A fork of go-redis/extra/redisotel/v9 that follows
[Semantic Conventions v1.27](https://github.com/open-telemetry/semantic-conventions/blob/v1.27.0/docs/database/README.md).

Expand Down
5 changes: 4 additions & 1 deletion hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import (
"testing"
"time"

"github.com/redis/go-redis/v9"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
semconv "go.opentelemetry.io/otel/semconv/v1.27.0"

"github.com/redis/go-redis/v9"
)

type fakeConn struct {
Expand Down Expand Up @@ -125,6 +126,7 @@ func Test_clientHook_DialHook(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
sr := tracetest.NewSpanRecorder()
tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
ch, err := newClientHook(tt.fields.rdsOpt, newConfig(append(tt.fields.opts, WithTracerProvider(tp))...))
Expand Down Expand Up @@ -304,6 +306,7 @@ func Test_clientHook_ProcessHook(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
sr := tracetest.NewSpanRecorder()
tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
ch, err := newClientHook(tt.fields.rdsOpt, newConfig(append(tt.fields.opts, WithTracerProvider(tp))...))
Expand Down

0 comments on commit 2571ca9

Please sign in to comment.