core/telemetry: move requestid to pkg directory (#4911)

This commit is contained in:
Caleb Doxsey 2024-01-19 13:18:16 -07:00 committed by GitHub
parent 803baeb9e1
commit 4301da3648
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 13 additions and 13 deletions

View file

@ -0,0 +1,15 @@
package requestid
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
)
func TestFromContext(t *testing.T) {
id := New()
ctx := WithValue(context.Background(), id)
ctxID := FromContext(ctx)
assert.Equal(t, ctxID, id)
}