Skip to content

Commit

Permalink
Added tests for trace.InitializeTracer.
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhartzheim committed Mar 27, 2018
1 parent 8675136 commit 7c3b838
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions trace/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ func TestCreateSpanWithParent(t *testing.T) {
}
}

func TestInitializeTracer(t *testing.T) {
opentracing.SetGlobalTracer(nil)
InitializeTracer("", "", "", "", 0.0, "")
if opentracing.GlobalTracer() == nil {
t.Error("InitializeTracer set a nil tracer.")
t.FailNow()
}
}

func TestInjectHeaders(t *testing.T) {
mt := mocktracer.New()
opentracing.SetGlobalTracer(mt)
Expand Down

0 comments on commit 7c3b838

Please sign in to comment.