@@ -3,7 +3,7 @@ import * as path from 'path';
3
3
import { getAPIResponse , runServer } from '../../../../utils/index' ;
4
4
import { TestAPIResponse } from '../server' ;
5
5
6
- test ( 'Should assign `baggage` header which contains 3rd party trace baggage data of an outgoing request.' , async ( ) => {
6
+ test ( 'Should assign `baggage` header which contains 3rd party trace baggage data to an outgoing request.' , async ( ) => {
7
7
const url = await runServer ( __dirname , `${ path . resolve ( __dirname , '..' ) } /server.ts` ) ;
8
8
9
9
const response = ( await getAPIResponse ( new URL ( `${ url } /express` ) , {
@@ -14,39 +14,39 @@ test('Should assign `baggage` header which contains 3rd party trace baggage data
14
14
expect ( response ) . toMatchObject ( {
15
15
test_data : {
16
16
host : 'somewhere.not.sentry' ,
17
- baggage : expect . stringContaining ( 'foo=bar,bar=baz' ) ,
17
+ baggage : 'foo=bar,bar=baz,sentry-environment=prod,sentry-release=1.0' ,
18
18
} ,
19
19
} ) ;
20
20
} ) ;
21
21
22
- test ( 'Should assign `baggage` header which contains sentry trace baggage data of an outgoing request.' , async ( ) => {
22
+ test ( 'Should assign `baggage` header which contains sentry trace baggage data to an outgoing request.' , async ( ) => {
23
23
const url = await runServer ( __dirname , `${ path . resolve ( __dirname , '..' ) } /server.ts` ) ;
24
24
25
25
const response = ( await getAPIResponse ( new URL ( `${ url } /express` ) , {
26
- baggage : 'sentry-version=1 .0.0,sentry-environment=production ' ,
26
+ baggage : 'sentry-version=2 .0.0,sentry-environment=myEnv ' ,
27
27
} ) ) as TestAPIResponse ;
28
28
29
29
expect ( response ) . toBeDefined ( ) ;
30
30
expect ( response ) . toMatchObject ( {
31
31
test_data : {
32
32
host : 'somewhere.not.sentry' ,
33
- baggage : expect . stringContaining ( 'sentry-version=1 .0.0,sentry-environment=production' ) ,
33
+ baggage : 'sentry-version=2 .0.0,sentry-environment=myEnv' ,
34
34
} ,
35
35
} ) ;
36
36
} ) ;
37
37
38
- test ( 'Should assign `baggage` header which contains sentry and 3rd party trace baggage data of an outgoing request.' , async ( ) => {
38
+ test ( 'Should assign `baggage` header which contains sentry and 3rd party trace baggage data to an outgoing request.' , async ( ) => {
39
39
const url = await runServer ( __dirname , `${ path . resolve ( __dirname , '..' ) } /server.ts` ) ;
40
40
41
41
const response = ( await getAPIResponse ( new URL ( `${ url } /express` ) , {
42
- baggage : 'sentry-version=1 .0.0,sentry-environment=production ,dogs=great' ,
42
+ baggage : 'sentry-version=2 .0.0,sentry-environment=myEnv ,dogs=great' ,
43
43
} ) ) as TestAPIResponse ;
44
44
45
45
expect ( response ) . toBeDefined ( ) ;
46
46
expect ( response ) . toMatchObject ( {
47
47
test_data : {
48
48
host : 'somewhere.not.sentry' ,
49
- baggage : expect . stringContaining ( 'dogs=great,sentry-version=1 .0.0,sentry-environment=production ' ) ,
49
+ baggage : expect . stringContaining ( 'dogs=great,sentry-version=2 .0.0,sentry-environment=myEnv ' ) ,
50
50
} ,
51
51
} ) ;
52
52
} ) ;
0 commit comments