Skip to content

Commit

Permalink
Update internal/global to use propagationtest
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Jul 21, 2021
1 parent f7f74fc commit 71cd299
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/global/propagator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import (
"testing"

"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/oteltest"
"go.opentelemetry.io/otel/propagation/propagationtest"
)

func TestTextMapPropagatorDelegation(t *testing.T) {
global.ResetForTest()
ctx := context.Background()
carrier := oteltest.NewTextMapCarrier(nil)
carrier := propagationtest.NewTextMapCarrier(nil)

// The default should be a noop.
initial := global.TextMapPropagator()
Expand All @@ -36,7 +36,7 @@ func TestTextMapPropagatorDelegation(t *testing.T) {
}

// Make sure the delegate woks as expected.
delegate := oteltest.NewTextMapPropagator("test")
delegate := propagationtest.NewTextMapPropagator("test")
delegate.Inject(ctx, carrier)
ctx = delegate.Extract(ctx, carrier)
if !delegate.InjectedN(t, carrier, 1) || !delegate.ExtractedN(t, ctx, 1) {
Expand All @@ -55,7 +55,7 @@ func TestTextMapPropagatorDelegation(t *testing.T) {
func TestTextMapPropagatorDelegationNil(t *testing.T) {
global.ResetForTest()
ctx := context.Background()
carrier := oteltest.NewTextMapCarrier(nil)
carrier := propagationtest.NewTextMapCarrier(nil)

// The default should be a noop.
initial := global.TextMapPropagator()
Expand All @@ -77,7 +77,7 @@ func TestTextMapPropagatorDelegationNil(t *testing.T) {
func TestTextMapPropagatorFields(t *testing.T) {
global.ResetForTest()
initial := global.TextMapPropagator()
delegate := oteltest.NewTextMapPropagator("test")
delegate := propagationtest.NewTextMapPropagator("test")
delegateFields := delegate.Fields()

// Sanity check on the initial Fields.
Expand Down

0 comments on commit 71cd299

Please sign in to comment.