@@ -156,7 +156,7 @@ describe('Server Access Logs - File Output', async () => {
156156 'loggingTargetBucket' : null , // DYNAMIC
157157 'loggingTargetPrefix' : null , // DYNAMIC
158158 'awsAccessKeyID' : 'accessKey1' , // STATIC
159- 'raftSessionID' : null , // UNKNOWN
159+ 'raftSessionID' : null , // UNKNOWN but available with scality backend, null otherwise
160160 } ;
161161
162162 const operations = [
@@ -2650,6 +2650,16 @@ describe('Server Access Logs - File Output', async () => {
26502650 assert . strictEqual ( logEntries [ logEntryIdx ] [ key ] , val ,
26512651 `Invalid value for ${ key } , action ${ properties . action } ` ) ;
26522652 }
2653+
2654+ // Verify raftSessionID is present when using scality backend
2655+ if ( config . backends . metadata === 'scality' ) {
2656+ assert . strictEqual ( 'raftSessionID' in logEntries [ logEntryIdx ] , true ,
2657+ `raftSessionID should be present for action ${ properties . action } ` ) ;
2658+ assert . strictEqual ( typeof logEntries [ logEntryIdx ] . raftSessionID , 'string' ,
2659+ `raftSessionID should be a string for action ${ properties . action } ` ) ;
2660+ assert . strictEqual ( logEntries [ logEntryIdx ] . raftSessionID . length > 0 , true ,
2661+ `raftSessionID should not be empty for action ${ properties . action } ` ) ;
2662+ }
26532663 }
26542664 } ) ;
26552665 }
0 commit comments