(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func TestSpanLogger_Log(t *testing.T) { |
| 16 | span, ctx := New(context.Background(), "test", "bar") |
| 17 | _ = span.Log("foo") |
| 18 | newSpan := FromContext(ctx) |
| 19 | require.Equal(t, span.Span, newSpan.Span) |
| 20 | _ = newSpan.Log("bar") |
| 21 | noSpan := FromContext(context.Background()) |
| 22 | _ = noSpan.Log("foo") |
| 23 | require.Error(t, noSpan.Error(errors.New("err"))) |
| 24 | require.NoError(t, noSpan.Error(nil)) |
| 25 | } |
| 26 | |
| 27 | func TestSpanLogger_CustomLogger(t *testing.T) { |
| 28 | var logged [][]any |
nothing calls this directly
no test coverage detected