blob: 36a32ff46e0ef9a093cb5903cb1257a2f2d28650 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package tracing
import (
"context"
"testing"
"github.com/caddyserver/caddy/v2"
)
func TestOpenTelemetryWrapper_newOpenTelemetryWrapper(t *testing.T) {
ctx, cancel := caddy.NewContext(caddy.Context{Context: context.Background()})
defer cancel()
var otw openTelemetryWrapper
var err error
if otw, err = newOpenTelemetryWrapper(ctx,
"",
); err != nil {
t.Errorf("newOpenTelemetryWrapper() error = %v", err)
t.FailNow()
}
if otw.propagators == nil {
t.Errorf("Propagators should not be empty")
}
}
|