Skip to content

Commit

Permalink
Skipping readonly/no access test for FIPS pipeline since the override…
Browse files Browse the repository at this point in the history
…s 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
  • Loading branch information
kc13greiner authored Dec 10, 2024
1 parent da93119 commit 4d9a70f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
});
});
});
};

0 comments on commit 4d9a70f

Please sign in to comment.