Skip to content

Commit ec55c0e

Browse files
CLDSRV-839: Test raft session id presence metadata
1 parent d095fe9 commit ec55c0e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/functional/aws-node-sdk/test/serverAccessLogs/testServerAccessLogFile.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)