Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Minor cleanups in the tests. (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Drutu authored Mar 15, 2019
1 parent 4c51322 commit 5439521
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions plugin/ochttp/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ func TestTransport_RoundTrip_Race(t *testing.T) {
}

func TestTransport_RoundTrip(t *testing.T) {
ctx := context.Background()
ctx, parent := trace.StartSpan(ctx, "parent")
_, parent := trace.StartSpan(context.Background(), "parent")
tests := []struct {
name string
parent *trace.Span
Expand Down
2 changes: 1 addition & 1 deletion resource/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestMultiDetector(t *testing.T) {
}

wantErr := errors.New("err1")
got, err = MultiDetector(
_, err = MultiDetector(
func(context.Context) (*Resource, error) {
return &Resource{
Type: "t1",
Expand Down
4 changes: 4 additions & 0 deletions trace/tracestate/tracestate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ func TestImplicitImmutableTracestate(t *testing.T) {

// Check Tracestate does not have key3.
checkKeyValue(t, tracestate, key3, "", testname)
// Check that we added the key3 in the entries
tracestate, err = New(nil, entries...)
checkError(t, tracestate, err, testname, "create failed")
checkKeyValue(t, tracestate, key3, value3, testname)
}

func TestKeyWithValidChar(t *testing.T) {
Expand Down

0 comments on commit 5439521

Please sign in to comment.