(t *testing.T)
| 77 | } |
| 78 | |
| 79 | func Test_Request_Context(t *testing.T) { |
| 80 | t.Parallel() |
| 81 | |
| 82 | req := AcquireRequest() |
| 83 | ctx := req.Context() |
| 84 | type ctxKey struct{} |
| 85 | var key ctxKey = struct{}{} |
| 86 | |
| 87 | require.Nil(t, ctx.Value(key)) |
| 88 | |
| 89 | ctx = context.WithValue(ctx, key, "string") |
| 90 | req.SetContext(ctx) |
| 91 | ctx = req.Context() |
| 92 | |
| 93 | v, ok := ctx.Value(key).(string) |
| 94 | require.True(t, ok) |
| 95 | require.Equal(t, "string", v) |
| 96 | } |
| 97 | |
| 98 | func Test_Request_Header(t *testing.T) { |
| 99 | t.Parallel() |
nothing calls this directly
no test coverage detected