File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ describe("request tracing", function () {
7777 expect ( correlationContext . includes ( "UsesKeyVault" ) ) . eq ( true ) ;
7878 } ) ;
7979
80- it ( "should have cdn tag in correlation-context header" , async ( ) => {
80+ it ( "should have cdn tag in correlation-context header when loadFromCdn is used " , async ( ) => {
8181 try {
8282 await loadFromCdn ( fakeEndpoint , {
8383 clientOptions
@@ -89,6 +89,18 @@ describe("request tracing", function () {
8989 expect ( correlationContext . includes ( "CDN" ) ) . eq ( true ) ;
9090 } ) ;
9191
92+ it ( "should not have cdn tag in correlation-context header when load is used" , async ( ) => {
93+ try {
94+ await load ( createMockedConnectionString ( fakeEndpoint ) , {
95+ clientOptions
96+ } ) ;
97+ } catch ( e ) { /* empty */ }
98+ expect ( headerPolicy . headers ) . not . undefined ;
99+ const correlationContext = headerPolicy . headers . get ( "Correlation-Context" ) ;
100+ expect ( correlationContext ) . not . undefined ;
101+ expect ( correlationContext . includes ( "CDN" ) ) . eq ( false ) ;
102+ } ) ;
103+
92104 it ( "should detect env in correlation-context header" , async ( ) => {
93105 process . env . NODE_ENV = "development" ;
94106 try {
You can’t perform that action at this time.
0 commit comments