Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FTR] Skipped basic license tests for FIPS #208916

Merged
merged 6 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
kc13greiner marked this conversation as resolved.
Show resolved Hide resolved
before(async () => {
if (license === 'basic' && !isServerless) {
await createUsersAndRoles(es, supertest);
}
await createUsersAndRoles(es, supertest);
});
loadTestFile(require.resolve('./copy_to_space'));
});
Expand Down
Original file line number Diff line number Diff line change
@@ -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'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -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');
kc13greiner marked this conversation as resolved.
Show resolved Hide resolved

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