From 4d9a70f48ebe342d2ce5183fb4b30fdeb2eaf89c Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 10 Dec 2024 12:32:11 -0500 Subject: [PATCH] Skipping readonly/no access test for FIPS pipeline since the overrides cause it to fail (#202719) ## Summary The FIPS pipeline runs all tests as a privileged superuser, some tests that check privileges fail and should be skipped for this pipeline The FIPS pipeline runs all test with a trial license, some tests that verify premium functionality vs basic should be skipped for this pipeline ## FIPS Pipeline run for this branch https://buildkite.com/elastic/kibana-fips/builds/304 --- .../logging/rolling_file_appender.test.ts | 2 +- .../security/tests/basic/graphs/ecs.ts | 3 +- .../enrich_policies_tab.ts | 31 ++++++++++--------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/core/server/integration_tests/logging/rolling_file_appender.test.ts b/src/core/server/integration_tests/logging/rolling_file_appender.test.ts index d21724be2de00..c9d2ce5a62d28 100644 --- a/src/core/server/integration_tests/logging/rolling_file_appender.test.ts +++ b/src/core/server/integration_tests/logging/rolling_file_appender.test.ts @@ -13,7 +13,7 @@ import moment from 'moment-timezone'; import { getNextRollingTime } from '@kbn/core-logging-server-internal'; import { createRoot as createkbnTestServerRoot } from '@kbn/core-test-helpers-kbn-server'; -const flushDelay = 250; +const flushDelay = 2000; const delay = (waitInMs: number) => new Promise((resolve) => setTimeout(resolve, waitInMs)); const flush = async () => delay(flushDelay); diff --git a/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/ecs.ts b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/ecs.ts index d24a72f796d44..f55efceb3d04c 100644 --- a/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/ecs.ts +++ b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/ecs.ts @@ -13,7 +13,8 @@ import { User } from '../../../../common/lib/authentication/types'; export default ({ getService }: FtrProviderContext): void => { const supertest = getService('supertest'); - describe('Run ecs_mapping', () => { + describe('Run ecs_mapping', function () { + this.tags('skipFIPS'); it('should get 404 when trying to run ecs_mapping with basic license', async () => { return await postEcsMapping({ supertest, diff --git a/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts b/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts index e74a14fe4f26b..0d090835139dd 100644 --- a/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts +++ b/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts @@ -100,16 +100,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { expect(await successToast.getVisibleText()).to.contain(`Executed ${ENRICH_POLICY_NAME}`); }); - it('read only access', async () => { - await security.testUser.setRoles(['index_management_monitor_enrich_only']); - await pageObjects.common.navigateToApp('indexManagement'); - await pageObjects.indexManagement.changeTabs('enrich_policiesTab'); - await pageObjects.header.waitUntilLoadingHasFinished(); - - await testSubjects.missingOrFail('createPolicyButton'); - await testSubjects.missingOrFail('deletePolicyButton'); - }); - it('can delete a policy', async () => { await security.testUser.setRoles(['index_management_user']); await pageObjects.common.navigateToApp('indexManagement'); @@ -129,10 +119,23 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { expect(await successToast.getVisibleText()).to.contain(`Deleted ${ENRICH_POLICY_NAME}`); }); - it('no access', async () => { - await security.testUser.setRoles(['index_management_monitor_only']); - await pageObjects.common.navigateToApp('indexManagement'); - await testSubjects.missingOrFail('enrich_policiesTab'); + describe('access', function () { + this.tags('skipFIPS'); + it('read only access', async () => { + await security.testUser.setRoles(['index_management_monitor_enrich_only']); + await pageObjects.common.navigateToApp('indexManagement'); + await pageObjects.indexManagement.changeTabs('enrich_policiesTab'); + await pageObjects.header.waitUntilLoadingHasFinished(); + + await testSubjects.missingOrFail('createPolicyButton'); + await testSubjects.missingOrFail('deletePolicyButton'); + }); + + it('no access', async () => { + await security.testUser.setRoles(['index_management_monitor_only']); + await pageObjects.common.navigateToApp('indexManagement'); + await testSubjects.missingOrFail('enrich_policiesTab'); + }); }); }); };