tracing: add minimal test
This commit is contained in:
22
tracing/tracing_test.go
Normal file
22
tracing/tracing_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestInit(t *testing.T) {
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
os.Setenv("OTEL_EXPORTER_OTLP_ENDPOINT", "localhost")
|
||||
|
||||
shutdownFn, err := InitTracer(ctx, &TracerConfig{})
|
||||
if err != nil {
|
||||
t.FailNow()
|
||||
}
|
||||
defer shutdownFn(ctx)
|
||||
|
||||
}
|
Reference in New Issue
Block a user