(t *testing.T)
| 132 | } |
| 133 | |
| 134 | func TestCtxLogger(t *testing.T) { |
| 135 | t.Parallel() |
| 136 | |
| 137 | ctx := context.Background() |
| 138 | |
| 139 | // Check the default value |
| 140 | assert.Equal(t, &log.Logger, CtxLogger(ctx)) |
| 141 | |
| 142 | // Check that when we set a value, this properly extracts it. |
| 143 | logger := log.With().Str("hello", "world").Logger() |
| 144 | ctx = context.WithValue(ctx, contextKeyLogger, &logger) |
| 145 | assert.Equal(t, &logger, CtxLogger(ctx)) |
| 146 | } |
| 147 | |
| 148 | func TestCtxSetPublicKey(t *testing.T) { |
| 149 | t.Skip("not implemented") |
nothing calls this directly
no test coverage detected