(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func TestBaggage(t *testing.T) { |
| 16 | t.Parallel() |
| 17 | prop := propagation.NewCompositeTextMapPropagator( |
| 18 | propagation.TraceContext{}, |
| 19 | propagation.Baggage{}, |
| 20 | ) |
| 21 | |
| 22 | expected := audit.WorkspaceBuildBaggage{ |
| 23 | IP: "127.0.0.1", |
| 24 | } |
| 25 | |
| 26 | ctx, err := audit.BaggageToContext(context.Background(), expected) |
| 27 | require.NoError(t, err) |
| 28 | |
| 29 | carrier := propagation.MapCarrier{} |
| 30 | prop.Inject(ctx, carrier) |
| 31 | bCtx := prop.Extract(ctx, carrier) |
| 32 | got := audit.BaggageFromContext(bCtx) |
| 33 | |
| 34 | require.Equal(t, expected, got) |
| 35 | } |
| 36 | |
| 37 | func TestResourceTarget_ChatTitleNotLeaked(t *testing.T) { |
| 38 | t.Parallel() |
nothing calls this directly
no test coverage detected