File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,6 @@ describe('Test config', function () {
3636 next = function ( ) { } ;
3737
3838 req = { } ;
39- req . header = function ( header ) {
40- return this . headers [ header ] ;
41- } ;
42- req . getHeader = req . header ;
4339
4440 req . connection = { } ;
4541 req . headers = { } ;
@@ -97,7 +93,16 @@ describe('Test config', function () {
9793 logObject . remote_host . should . equal ( "1.2.3.4" ) ;
9894 logObject . remote_port . should . equal ( "8080" ) ;
9995 } ) ;
96+
97+ it ( 'Test correlation_id fallback' , function ( ) {
98+ req . headers [ "x-vcap-request-id" ] = "test123" ;
99+ httpLogger . logNetwork ( req , res , next ) ;
100+ fireLog ( ) ;
101+
102+ logObject . request_id . should . equal ( "test123" ) ;
103+ logObject . correlation_id . should . equal ( "test123" ) ;
100104
105+ } ) ;
101106
102107
103108 it ( 'Test HTTP header propagation' , function ( ) {
You can’t perform that action at this time.
0 commit comments