mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[FTR] Skipped basic license tests for FIPS (#208916)
## Summary All tests in `deployment_agnostic/security_and_spaces/stateful.config_basic.ts` and `deployment_agnostic/security_and_spaces/stateful.copy_to_space.config_basic.ts` are intended to be run only with `basic` license, since FIPS overrides it we need to skip that test for FIPS. Separated index entries for `basic` and `trial` license, so tests with trial config would still run. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
b62dff1656
commit
9120c36e16
10 changed files with 50 additions and 34 deletions
|
@ -32,14 +32,7 @@ export default function copyToSpaceSpacesAndSecuritySuite(
|
|||
createMultiNamespaceTestCases,
|
||||
} = copyToSpaceTestSuiteFactory(context);
|
||||
|
||||
const config = context.getService('config');
|
||||
const license = config.get('esTestCluster.license');
|
||||
|
||||
describe('copy to spaces', function () {
|
||||
if (license === 'basic') {
|
||||
this.tags('skipFIPS');
|
||||
}
|
||||
|
||||
[
|
||||
{
|
||||
spaceId: SPACES.DEFAULT.spaceId,
|
||||
|
|
|
@ -9,20 +9,13 @@ import { createUsersAndRoles } from '../../../../common/lib/create_users_and_rol
|
|||
import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile, getService }: DeploymentAgnosticFtrProviderContext) {
|
||||
const config = getService('config');
|
||||
const license = config.get('esTestCluster.license');
|
||||
const es = getService('es');
|
||||
const supertest = getService('supertest');
|
||||
const isServerless = config.get('serverless');
|
||||
|
||||
describe('spaces api with security', function () {
|
||||
// Should be enabled when custom roles can be provisioned for MKI
|
||||
// See: https://github.com/elastic/kibana/issues/207361
|
||||
this.tags('skipMKI');
|
||||
this.tags('skipFIPS');
|
||||
before(async () => {
|
||||
if (license === 'basic' && !isServerless) {
|
||||
await createUsersAndRoles(es, supertest);
|
||||
}
|
||||
await createUsersAndRoles(es, supertest);
|
||||
});
|
||||
loadTestFile(require.resolve('./copy_to_space'));
|
||||
});
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile, getService }: DeploymentAgnosticFtrProviderContext) {
|
||||
describe('spaces api with security', function () {
|
||||
// Should be enabled when custom roles can be provisioned for MKI
|
||||
// See: https://github.com/elastic/kibana/issues/207361
|
||||
this.tags('skipMKI');
|
||||
|
||||
loadTestFile(require.resolve('./copy_to_space'));
|
||||
});
|
||||
}
|
|
@ -9,25 +9,16 @@ import { createUsersAndRoles } from '../../../common/lib/create_users_and_roles'
|
|||
import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile, getService }: DeploymentAgnosticFtrProviderContext) {
|
||||
const config = getService('config');
|
||||
const license = config.get('esTestCluster.license');
|
||||
const es = getService('es');
|
||||
const supertest = getService('supertest');
|
||||
// Should we enabled when custom roles can be provisioned for MKI
|
||||
// See: https://github.com/elastic/kibana/issues/207361
|
||||
const tags = ['skipMKI'];
|
||||
|
||||
if (license === 'basic') {
|
||||
tags.push('skipFIPS');
|
||||
}
|
||||
|
||||
describe('spaces api with security', function () {
|
||||
this.tags(tags);
|
||||
this.tags('skipFIPS');
|
||||
|
||||
before(async () => {
|
||||
if (license === 'basic') {
|
||||
await createUsersAndRoles(es, supertest);
|
||||
}
|
||||
await createUsersAndRoles(es, supertest);
|
||||
});
|
||||
|
||||
loadTestFile(require.resolve('./resolve_copy_to_space_conflicts'));
|
||||
loadTestFile(require.resolve('./create'));
|
||||
loadTestFile(require.resolve('./delete'));
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
|
||||
describe('spaces api with security', function () {
|
||||
this.tags('skipMKI');
|
||||
|
||||
loadTestFile(require.resolve('./resolve_copy_to_space_conflicts'));
|
||||
loadTestFile(require.resolve('./create'));
|
||||
loadTestFile(require.resolve('./delete'));
|
||||
loadTestFile(require.resolve('./get_all'));
|
||||
loadTestFile(require.resolve('./get'));
|
||||
loadTestFile(require.resolve('./update'));
|
||||
});
|
||||
}
|
|
@ -12,7 +12,7 @@ export default createServerlessTestConfig({
|
|||
// @ts-expect-error roleScopedSupertest service accepts a user not just a user role and is different from the one in the common services
|
||||
services,
|
||||
serverlessProject: 'security',
|
||||
testFiles: [require.resolve('./apis/copy_to_space')],
|
||||
testFiles: [require.resolve('./apis/copy_to_space/index_trial')],
|
||||
junit: {
|
||||
reportName:
|
||||
'X-Pack Spaces API Deployment Agnostic Integration Tests -- copy_to_space - serverless',
|
||||
|
|
|
@ -15,5 +15,5 @@ import { createTestConfig } from '../../common/config';
|
|||
|
||||
export default createTestConfig('security_and_spaces - basic license', {
|
||||
license: 'basic',
|
||||
testFiles: [require.resolve('./apis')],
|
||||
testFiles: [require.resolve('./apis/index_basic')],
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ import { services } from '../services';
|
|||
export default createStatefulTestConfig({
|
||||
// @ts-expect-error roleScopedSupertest service accepts a user not just a user role and is different from the one in the common services
|
||||
services,
|
||||
testFiles: [require.resolve('./apis')],
|
||||
testFiles: [require.resolve('./apis/index_trial')],
|
||||
junit: {
|
||||
reportName:
|
||||
'X-Pack Spaces API Deployment Agnostic Integration Tests -- security_and_spaces - trial license',
|
||||
|
|
|
@ -9,5 +9,5 @@ import { createTestConfig } from '../../common/config';
|
|||
|
||||
export default createTestConfig('copy_to_space - basic license', {
|
||||
license: 'basic',
|
||||
testFiles: [require.resolve('./apis/copy_to_space')],
|
||||
testFiles: [require.resolve('./apis/copy_to_space/index_basic')],
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ import { services } from '../services';
|
|||
export default createStatefulTestConfig({
|
||||
// @ts-expect-error roleScopedSupertest service accepts a user not just a user role and is different from the one in the common services
|
||||
services,
|
||||
testFiles: [require.resolve('./apis/copy_to_space')],
|
||||
testFiles: [require.resolve('./apis/copy_to_space/index_trial')],
|
||||
junit: {
|
||||
reportName:
|
||||
'X-Pack Spaces API Deployment Agnostic Integration Tests -- copy_to_space - trial license',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue