You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kratos/pkg/net/trace/marshal_test.go

19 lines
401 B

6 years ago
package trace
import (
"testing"
)
func TestMarshalSpanV1(t *testing.T) {
report := &mockReport{}
6 years ago
t1 := NewTracer("service1", report, true)
sp1 := t1.New("opt_test").(*Span)
6 years ago
sp1.SetLog(Log("hello", "test123"))
sp1.SetTag(TagString("tag1", "hell"), TagBool("booltag", true), TagFloat64("float64tag", 3.14159))
sp1.Finish(nil)
_, err := marshalSpanV1(sp1)
if err != nil {
t.Error(err)
}
}