From 5a8622b4d77fed4671f4c82022c414c91a73ea85 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Thu, 17 Sep 2020 13:33:55 +0200 Subject: [PATCH 1/3] Re-enable session lifespan api integration tests. --- .../tests/session_idle/cleanup.ts | 5 +---- .../tests/session_lifespan/cleanup.ts | 8 ++------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts b/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts index c4302b7637923..01e2ad76fb3d2 100644 --- a/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts +++ b/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts @@ -36,11 +36,8 @@ export default function ({ getService }: FtrProviderContext) { describe('Session Idle cleanup', () => { beforeEach(async () => { await es.cluster.health({ index: '.kibana_security_session*', waitForStatus: 'green' }); - await es.deleteByQuery({ + await es.indices.delete({ index: '.kibana_security_session*', - q: '*', - waitForCompletion: true, - refresh: true, ignore: [404], }); }); diff --git a/x-pack/test/security_api_integration/tests/session_lifespan/cleanup.ts b/x-pack/test/security_api_integration/tests/session_lifespan/cleanup.ts index dbdaf494fdf27..6036acf3d1cf1 100644 --- a/x-pack/test/security_api_integration/tests/session_lifespan/cleanup.ts +++ b/x-pack/test/security_api_integration/tests/session_lifespan/cleanup.ts @@ -30,15 +30,11 @@ export default function ({ getService }: FtrProviderContext) { return (await es.search({ index: '.kibana_security_session*' })).hits.total.value; } - // FLAKY: https://github.com/elastic/kibana/issues/76223 - describe.skip('Session Lifespan cleanup', () => { + describe('Session Lifespan cleanup', () => { beforeEach(async () => { await es.cluster.health({ index: '.kibana_security_session*', waitForStatus: 'green' }); - await es.deleteByQuery({ + await es.indices.delete({ index: '.kibana_security_session*', - q: '*', - waitForCompletion: true, - refresh: true, ignore: [404], }); }); From 1db41a54585bea11cc5dc696f80f0f49f35104a4 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Thu, 17 Sep 2020 15:45:44 +0200 Subject: [PATCH 2/3] Use unique report names per test config. --- x-pack/test/api_integration/config_security_basic.ts | 1 + x-pack/test/api_integration/config_security_trial.ts | 1 + x-pack/test/functional/config_security_basic.ts | 2 +- x-pack/test/security_api_integration/session_idle.config.ts | 2 +- x-pack/test/security_api_integration/session_lifespan.config.ts | 2 +- x-pack/test/security_functional/login_selector.config.ts | 2 +- x-pack/test/security_functional/oidc.config.ts | 2 +- x-pack/test/security_functional/saml.config.ts | 2 +- 8 files changed, 8 insertions(+), 6 deletions(-) diff --git a/x-pack/test/api_integration/config_security_basic.ts b/x-pack/test/api_integration/config_security_basic.ts index 8489940505686..237d162e80328 100644 --- a/x-pack/test/api_integration/config_security_basic.ts +++ b/x-pack/test/api_integration/config_security_basic.ts @@ -19,6 +19,7 @@ export default async function (context: FtrConfigProviderContext) { 'xpack.security.authc.api_key.enabled=true', ]; config.testFiles = [require.resolve('./apis/security/security_basic')]; + config.junit.reportName = 'X-Pack API Integration Tests (Security Basic)'; return config; }); } diff --git a/x-pack/test/api_integration/config_security_trial.ts b/x-pack/test/api_integration/config_security_trial.ts index 4c1e2913b987c..839165d8618cf 100644 --- a/x-pack/test/api_integration/config_security_trial.ts +++ b/x-pack/test/api_integration/config_security_trial.ts @@ -12,6 +12,7 @@ import { default as createTestConfig } from './config'; export default async function (context: FtrConfigProviderContext) { return createTestConfig(context).then((config) => { config.testFiles = [require.resolve('./apis/security/security_trial')]; + config.junit.reportName = 'X-Pack API Integration Tests (Security Trial)'; return config; }); } diff --git a/x-pack/test/functional/config_security_basic.ts b/x-pack/test/functional/config_security_basic.ts index 48c397d9c37de..968281b75b7ac 100644 --- a/x-pack/test/functional/config_security_basic.ts +++ b/x-pack/test/functional/config_security_basic.ts @@ -70,7 +70,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { }, junit: { - reportName: 'Chrome X-Pack UI Functional Tests', + reportName: 'Chrome X-Pack UI Functional Tests (Security Basic)', }, }; } diff --git a/x-pack/test/security_api_integration/session_idle.config.ts b/x-pack/test/security_api_integration/session_idle.config.ts index da85c6342037e..34a23b7f5f926 100644 --- a/x-pack/test/security_api_integration/session_idle.config.ts +++ b/x-pack/test/security_api_integration/session_idle.config.ts @@ -36,7 +36,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { }, junit: { - reportName: 'X-Pack Security API Integration Tests', + reportName: 'X-Pack Security API Integration Tests (Session Idle Timeout)', }, }; } diff --git a/x-pack/test/security_api_integration/session_lifespan.config.ts b/x-pack/test/security_api_integration/session_lifespan.config.ts index 17773a7739847..b5fdf6b6914b1 100644 --- a/x-pack/test/security_api_integration/session_lifespan.config.ts +++ b/x-pack/test/security_api_integration/session_lifespan.config.ts @@ -36,7 +36,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { }, junit: { - reportName: 'X-Pack Security API Integration Tests', + reportName: 'X-Pack Security API Integration Tests (Session Lifespan)', }, }; } diff --git a/x-pack/test/security_functional/login_selector.config.ts b/x-pack/test/security_functional/login_selector.config.ts index 48665c93c091a..bdb4778740503 100644 --- a/x-pack/test/security_functional/login_selector.config.ts +++ b/x-pack/test/security_functional/login_selector.config.ts @@ -76,7 +76,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { screenshots: { directory: resolve(__dirname, 'screenshots') }, junit: { - reportName: 'Chrome X-Pack Security Functional Tests', + reportName: 'Chrome X-Pack Security Functional Tests (Login Selector)', }, }; } diff --git a/x-pack/test/security_functional/oidc.config.ts b/x-pack/test/security_functional/oidc.config.ts index 5fd59e049a0f4..1ed5d51098420 100644 --- a/x-pack/test/security_functional/oidc.config.ts +++ b/x-pack/test/security_functional/oidc.config.ts @@ -76,7 +76,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { screenshots: { directory: resolve(__dirname, 'screenshots') }, junit: { - reportName: 'Chrome X-Pack Security Functional Tests', + reportName: 'Chrome X-Pack Security Functional Tests (OpenID Connect)', }, }; } diff --git a/x-pack/test/security_functional/saml.config.ts b/x-pack/test/security_functional/saml.config.ts index c47145f8bc039..9d925bee480a8 100644 --- a/x-pack/test/security_functional/saml.config.ts +++ b/x-pack/test/security_functional/saml.config.ts @@ -70,7 +70,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { screenshots: { directory: resolve(__dirname, 'screenshots') }, junit: { - reportName: 'Chrome X-Pack Security Functional Tests', + reportName: 'Chrome X-Pack Security Functional Tests (SAML)', }, }; } From f60ba7dac384989e3660eb7c4035ecd71b00aec3 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Fri, 18 Sep 2020 09:02:00 +0200 Subject: [PATCH 3/3] Re-enable idle timeout tests. --- .../security_api_integration/tests/session_idle/cleanup.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts b/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts index 5a72d46425452..01e2ad76fb3d2 100644 --- a/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts +++ b/x-pack/test/security_api_integration/tests/session_idle/cleanup.ts @@ -33,8 +33,7 @@ export default function ({ getService }: FtrProviderContext) { return (await es.search({ index: '.kibana_security_session*' })).hits.total.value; } - // FLAKY: https://github.com/elastic/kibana/issues/76239 - describe.skip('Session Idle cleanup', () => { + describe('Session Idle cleanup', () => { beforeEach(async () => { await es.cluster.health({ index: '.kibana_security_session*', waitForStatus: 'green' }); await es.indices.delete({