Skip to content

Commit

Permalink
Merge pull request #8 from equinix-labs/test-ContextWithTraceparentSt…
Browse files Browse the repository at this point in the history
…ring

test ContextWithTraceparentString
  • Loading branch information
edw-eqix authored Feb 26, 2022
2 parents 105d3f9 + 84c6a6a commit 183b0ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions otelhelpers/context_traceparent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,14 @@ func TestTpFromCmdline(t *testing.T) {
}
}
}

func TestContextWithTraceparentString(t *testing.T) {
testTp := "00-f61fc53f926e07a9c3893b1a722e1b65-7a2d6a804f3de137-01"

ctx := ContextWithTraceparentString(context.Background(), testTp)
tp := TraceparentStringFromContext(ctx)

if tp != testTp {
t.Errorf("expected %q got %q", testTp, tp)
}
}

0 comments on commit 183b0ab

Please sign in to comment.