MCPcopy
hub / github.com/rs/zerolog / TestCtxWithID

Function TestCtxWithID

hlog/hlog_test.go:371–382  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

369}
370
371func TestCtxWithID(t *testing.T) {
372 ctx := context.Background()
373
374 id, _ := xid.FromString(`c0umremcie6smuu506pg`)
375
376 want := context.Background()
377 want = context.WithValue(want, idKey{}, id)
378
379 if got := CtxWithID(ctx, id); !reflect.DeepEqual(got, want) {
380 t.Errorf("CtxWithID() = %v, want %v", got, want)
381 }
382}
383
384func TestHostHandler(t *testing.T) {
385 out := &bytes.Buffer{}

Callers

nothing calls this directly

Calls 1

CtxWithIDFunction · 0.85

Tested by

no test coverage detected