Skip to content

Commit

Permalink
modify unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ida613 committed Feb 5, 2025
1 parent 097d163 commit 70435b2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/dd-trace/test/opentracing/propagation/text_map.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,20 @@ describe('TextMapPropagator', () => {
expect(spanContextD._baggageItems).to.deep.equal({})
})

it('should not extract baggage when it is the only propagation style', () => {
config = new Config({
tracePropagationStyle: {
extract: ['baggage']
}
})
propagator = new TextMapPropagator(config)
const carrier = {
baggage: 'foo=bar'
}
const spanContext = propagator.extract(carrier)
expect(spanContext).to.be.null
})

it('should convert signed IDs to unsigned', () => {
textMap['x-datadog-trace-id'] = '-123'
textMap['x-datadog-parent-id'] = '-456'
Expand Down

0 comments on commit 70435b2

Please sign in to comment.