Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 01:00 UTC
| 1 | package tracing |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | "testing" |
| 6 | |
| 7 | "github.com/caddyserver/caddy/v2" |
| 8 | ) |
| 9 | |
| 10 | func TestOpenTelemetryWrapper_newOpenTelemetryWrapper(t *testing.T) { |
| 11 | ctx, cancel := caddy.NewContext(caddy.Context{Context: context.Background()}) |
| 12 | defer cancel() |
| 13 | |
| 14 | var otw openTelemetryWrapper |
| 15 | var err error |
| 16 | |
| 17 | if otw, err = newOpenTelemetryWrapper(ctx, |
| 18 | "", |
| 19 | nil, |
| 20 | ); err != nil { |
| 21 | t.Errorf("newOpenTelemetryWrapper() error = %v", err) |
| 22 | t.FailNow() |
| 23 | } |
| 24 | |
| 25 | if otw.propagators == nil { |
| 26 | t.Errorf("Propagators should not be empty") |
| 27 | } |
| 28 | } |