split case api integration security and spaces config_trial

This commit is contained in:
Charis Kalpakis 2025-01-07 15:59:05 +02:00 committed by GitHub
parent f57ce3096c
commit ff597e3670
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 3 deletions

View file

@ -178,6 +178,7 @@ enabled:
- x-pack/test/banners_functional/config.ts
- x-pack/test/cases_api_integration/security_and_spaces/config_basic.ts
- x-pack/test/cases_api_integration/security_and_spaces/config_trial.ts
- x-pack/test/cases_api_integration/security_and_spaces/config_trial_common.ts
- x-pack/test/cases_api_integration/security_and_spaces/config_no_public_base_url.ts
- x-pack/test/cases_api_integration/spaces_only/config.ts
- x-pack/test/disable_ems/config.ts

View file

@ -0,0 +1,16 @@
/*
* 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 { createTestConfig } from '../common/config';
// eslint-disable-next-line import/no-default-export
export default createTestConfig('security_and_spaces', {
license: 'trial',
ssl: true,
testFiles: [require.resolve('./tests/common/index_common_trial')],
publicBaseUrl: true,
});

View file

@ -0,0 +1,31 @@
/*
* 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 { FtrProviderContext } from '../../../../common/ftr_provider_context';
import {
createSpacesAndUsers,
deleteSpacesAndUsers,
activateUserProfiles,
} from '../../../../common/lib/authentication';
// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile, getService }: FtrProviderContext): void => {
describe('cases security and spaces enabled: trial', function () {
before(async () => {
await createSpacesAndUsers(getService);
// once a user profile is created the only way to remove it is to delete the user and roles, so best to activate
// before all the tests
await activateUserProfiles(getService);
});
after(async () => {
await deleteSpacesAndUsers(getService);
});
loadTestFile(require.resolve('..'));
});
};

View file

@ -51,9 +51,6 @@ export default ({ loadTestFile, getService }: FtrProviderContext): void => {
// Connectors
loadTestFile(require.resolve('./connectors/cases/cases_connector'));
// Common
loadTestFile(require.resolve('../common'));
// NOTE: These need to be at the end because they could delete the .kibana index and inadvertently remove the users and spaces
loadTestFile(require.resolve('../common/migrations'));