Skip to content

Commit

Permalink
Add debug logging to session cleanup api integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthMantri committed Sep 18, 2024
1 parent d968cc0 commit 13568bc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions x-pack/test/security_api_integration/tests/session_idle/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService }: FtrProviderContext) {
const supertest = getService('supertestWithoutAuth');
const esSupertest = getService('esSupertest');
const es = getService('es');
const esDeleteAllIndices = getService('esDeleteAllIndices');
const config = getService('config');
Expand Down Expand Up @@ -93,9 +94,19 @@ export default function ({ getService }: FtrProviderContext) {
});
}

async function addESDebugLoggingSettings() {
const addLogging = {
persistent: {
'logger.org.elasticsearch.xpack.security.authc': 'debug',
},
};
await esSupertest.put('/_cluster/settings').send(addLogging).expect(200);
}

describe('Session Idle cleanup', () => {
beforeEach(async () => {
await es.cluster.health({ index: '.kibana_security_session*', wait_for_status: 'green' });
await addESDebugLoggingSettings();
await esDeleteAllIndices('.kibana_security_session*');
});

Expand Down

0 comments on commit 13568bc

Please sign in to comment.