From 1aeecaf24f9ee97127f13cf859f6011f94333ce9 Mon Sep 17 00:00:00 2001 From: Robert Oskamp Date: Thu, 15 Aug 2024 17:06:50 +0200 Subject: [PATCH] Skip some serverless tests after roles and spaces changes in QA (#190599) ## Summary This PR skips some serverless tests after changes on roles and spaces have been applied to the QA environment. ### Details After role management and multiple spaces have been enabled in the QA environment, a number of tests started to fail when running against MKI. Since we run the same set of tests against QA and Staging, we can't just fix the tests to work with the changes in QA because then they would fail when running against Staging. After carefully checking the assertions in the tests (mainly checking that certain things are NOT available, while we gradually make them available again env by env), we decided in a small group discussion it's the best way forward to temporarily skip these tests and revisit them once the change has been applied to all environments. Some of the tests might be deleted then, others might be adjusted to the new behavior. To be clear: this is not ideal and this outcome is a trade-off for this specific situation and should not be used as future guidance to handle this kind of problem. We have some ideas of how to deal with changes that are applied gradually to the environments, but it takes more time to consolidate these. In the interest of moving forward quickly, the test skip was considered the best solution for now. --- .../test_suites/common/management/spaces.ts | 4 +++- .../test_suites/common/platform_security/authorization.ts | 8 ++++++-- .../common/management/data_views/serverless.ts | 4 +++- .../test_suites/common/management/landing_page.ts | 8 ++++++-- .../test_suites/common/spaces/spaces_selection.ts | 4 +++- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts b/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts index 4a8f65e4a9514a..5c1e22811bdc37 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts @@ -39,7 +39,9 @@ export default function ({ getService }: FtrProviderContext) { svlCommonApi.assertResponseStatusCode(400, status, body); }); - it('#create', async () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + it.skip('#create', async () => { const { body, status } = await supertestWithoutAuth .post('/api/spaces/space') .set(internalRequestHeader) diff --git a/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts b/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts index 7c7f3caea85266..95277f9ea8d798 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts @@ -42,7 +42,9 @@ export default function ({ getService }: FtrProviderContext) { describe('route access', () => { describe('internal', () => { describe('disabled', () => { - it('get all privileges', async () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + it.skip('get all privileges', async () => { const { body, status } = await supertestWithoutAuth .get('/api/security/privileges') .set(svlCommonApi.getInternalRequestHeader()) @@ -50,7 +52,9 @@ export default function ({ getService }: FtrProviderContext) { svlCommonApi.assertApiNotFound(body, status); }); - it('get built-in elasticsearch privileges', async () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + it.skip('get built-in elasticsearch privileges', async () => { const { body, status } = await supertestWithoutAuth .get('/internal/security/esPrivileges/builtin') .set(svlCommonApi.getInternalRequestHeader()) diff --git a/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts b/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts index 83f70a465a49eb..d97ee9fce2cd43 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts @@ -100,7 +100,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - describe('when in single space mode', function () { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('when in single space mode', function () { let dataViewId = ''; before(async () => { await esArchiver.load( diff --git a/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts b/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts index 1796997bd7d77b..1080ba0bc5c6b4 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts @@ -47,7 +47,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }).not.to.throwError(); }); - describe('Roles management card', () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('Roles management card', () => { it('should not be displayed by default', async () => { await retry.waitFor('page to be visible', async () => { return await testSubjects.exists('cards-navigation-page'); @@ -56,7 +58,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); - describe('Organization members management card', () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('Organization members management card', () => { it('should not be displayed by default', async () => { await retry.waitFor('page to be visible', async () => { return await testSubjects.exists('cards-navigation-page'); diff --git a/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts b/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts index 47c63fc2371370..526d0b3db5a410 100644 --- a/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts +++ b/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts @@ -12,7 +12,9 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { const svlCommonNavigation = getService('svlCommonNavigation'); const testSubjects = getService('testSubjects'); - describe('space selection', function () { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('space selection', function () { before(async () => { await svlCommonPage.loginAsViewer(); });