mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
[Obs Logs Essentials] Initial FTR test setup (#223612)
## Summary This PR adds the initial FTR test setup for the serverless Observability Logs Essentials tier. > [!IMPORTANT] This PR is focused on providing the base structure and make sure the tests can run in CI. The included tests are serving as usage examples only and will have to be extended by Logs Essentials owners to achieve proper test coverage. ### Changes > [!NOTE] The selection of tests for the logs essentials tier happens through inclusion in specific test index files which are loaded by logs essentials specific test config files. No tagging or other modification of existing tests needed - the keep running for the complete tier. Test files / directories can be included in complete tier test index files or logs essentials tier test index files or both, giving us full control over which tests are running where. #### `x-pack/test_serverless` - Add api_integration and functional config files and index files, including common tests and load some example tests each - this way, existing complete tier tests can be selected and included fro logs essentials test runs. - Add api_integration and functional `logs_essentials_only` directories and include them in the logs essentials test index file - this way, new test can be created that do not run on the complete tier and are specific to the logs essentials tier. - Add one example test each (assert the SLO settings API is not available / assert the SLO menu entry is not displayed). These serve as placeholders and are mainly there to demonstrate usage of this area - going forward, they should be replaced, extended and/or modified as needed. #### `x-pack/test/api_integration/deployment_agnostic` - Extend serverless base config parameters with an optional `tier` so actual configs calling `createServerlessTestConfig` can provide a `tier`. - Add logs essentials specific config and index file and include core tests as an example. - There are no `logs_essentials_only` tests in this area, because logs essentials is a serverless only option and as such tests specific to that option should go into the `test_serverless` directory.
This commit is contained in:
parent
31e5f46308
commit
61cc2fc20a
15 changed files with 288 additions and 0 deletions
|
@ -9,11 +9,14 @@ disabled:
|
|||
defaultQueue: 'n2-4-spot'
|
||||
enabled:
|
||||
- x-pack/test_serverless/api_integration/test_suites/observability/config.ts
|
||||
- x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts
|
||||
- x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts
|
||||
- x-pack/test_serverless/api_integration/test_suites/observability/common_configs/config.group1.ts
|
||||
- x-pack/test_serverless/api_integration/test_suites/observability/common_configs/config.logs_essentials.group1.ts
|
||||
- x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts
|
||||
- x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/config.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/config.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/config.logs_essentials.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/config.examples.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/config.saved_objects_management.ts
|
||||
|
@ -31,10 +34,12 @@ enabled:
|
|||
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group10.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group11.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group12.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.logs_essentials.group1.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts
|
||||
- x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts
|
||||
# serverless config files that run deployment-agnostic tests
|
||||
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
|
||||
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.logs_essentials.serverless.config.ts
|
||||
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts
|
||||
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts
|
||||
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts
|
||||
|
|
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
|
@ -1328,6 +1328,9 @@ src/platform/plugins/shared/discover/public/context_awareness/profile_providers/
|
|||
# Observability UI
|
||||
/x-pack/test_serverless/api_integration/test_suites/observability/config.ts @elastic/observability-ui @elastic/appex-qa
|
||||
/x-pack/test_serverless/api_integration/test_suites/observability/index.ts @elastic/observability-ui
|
||||
/x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts @elastic/observability-ui @elastic/appex-qa
|
||||
/x-pack/test_serverless/api_integration/test_suites/observability/index.logs_essentials.ts @elastic/observability-ui
|
||||
/x-pack/test_serverless/api_integration/test_suites/observability/logs_essentials_only @elastic/observability-ui
|
||||
|
||||
### Observability Plugins
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* 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 { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
|
||||
describe('Serverless Observability Logs Essentials - Deployment-agnostic API integration tests', function () {
|
||||
this.tags(['esGate']);
|
||||
|
||||
// load new oblt and platform deployment-agnostic test here
|
||||
// Note: if your tests runtime is over 5 minutes, create a new index and config file
|
||||
loadTestFile(require.resolve('../../apis/core'));
|
||||
});
|
||||
}
|
|
@ -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 { createServerlessTestConfig } from '../../default_configs/serverless.config.base';
|
||||
|
||||
export default createServerlessTestConfig({
|
||||
serverlessProject: 'oblt',
|
||||
tier: 'oblt_logs_essentials',
|
||||
testFiles: [require.resolve('./oblt.logs_essentials.index.ts')],
|
||||
junit: {
|
||||
reportName:
|
||||
'Serverless Observability Logs Essentials - Deployment-agnostic API Integration Tests',
|
||||
},
|
||||
});
|
|
@ -25,6 +25,7 @@ interface CreateTestConfigOptions<T extends DeploymentAgnosticCommonServices> {
|
|||
testFiles: string[];
|
||||
junit: { reportName: string };
|
||||
suiteTags?: { include?: string[]; exclude?: string[] };
|
||||
tier?: 'oblt_logs_essentials';
|
||||
}
|
||||
|
||||
// include settings from elasticsearch controller
|
||||
|
@ -135,6 +136,13 @@ export function createServerlessTestConfig<T extends DeploymentAgnosticCommonSer
|
|||
...(dockerRegistryPort
|
||||
? [`--xpack.fleet.registryUrl=http://localhost:${dockerRegistryPort}`]
|
||||
: []),
|
||||
...(options.tier && options.tier === 'oblt_logs_essentials'
|
||||
? [
|
||||
`--pricing.tiers.products=${JSON.stringify([
|
||||
{ name: 'observability', tier: 'logs_essentials' },
|
||||
])}`,
|
||||
]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
testFiles: options.testFiles,
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* 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 { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const baseTestConfig = await readConfigFile(require.resolve('../config.logs_essentials.ts'));
|
||||
|
||||
return {
|
||||
...baseTestConfig.getAll(),
|
||||
testFiles: [require.resolve('../../common/telemetry')],
|
||||
junit: {
|
||||
reportName: 'Serverless Observability Logs Essentials API Integration Tests - Common Group 1',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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 { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
import { services as apmServices } from './apm_api_integration/common/services';
|
||||
import { services as datasetQualityServices } from './dataset_quality_api_integration/common/services';
|
||||
|
||||
export default createTestConfig({
|
||||
serverlessProject: 'oblt',
|
||||
testFiles: [require.resolve('./index.logs_essentials.ts')],
|
||||
junit: {
|
||||
reportName: 'Serverless Observability Logs Essentials API Integration Tests',
|
||||
},
|
||||
suiteTags: { exclude: ['skipSvlOblt'] },
|
||||
services: { ...apmServices, ...datasetQualityServices },
|
||||
|
||||
// include settings from elasticsearch controller
|
||||
esServerArgs: ['xpack.ml.dfa.enabled=false'],
|
||||
kbnServerArgs: [
|
||||
// defined in MKI control plane
|
||||
'--xpack.uptime.service.manifestUrl=mockDevUrl',
|
||||
// useful for testing (also enabled in MKI QA)
|
||||
'--coreApp.allowDynamicConfigOverrides=true',
|
||||
'--xpack.dataUsage.enabled=true',
|
||||
'--xpack.dataUsage.enableExperimental=[]',
|
||||
// dataUsage.autoops* config is set in kibana controller
|
||||
'--xpack.dataUsage.autoops.enabled=true',
|
||||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--pricing.tiers.products=${JSON.stringify([
|
||||
{ name: 'observability', tier: 'logs_essentials' },
|
||||
])}`,
|
||||
],
|
||||
});
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* 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 '../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('Serverless observability logs essentials API', function () {
|
||||
this.tags(['esGate']);
|
||||
|
||||
loadTestFile(require.resolve('./logs_essentials_only'));
|
||||
loadTestFile(require.resolve('./cases'));
|
||||
});
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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 '../../../ftr_provider_context';
|
||||
import { SupertestWithRoleScopeType } from '../../../../shared/services';
|
||||
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const roleScopedSupertest = getService('roleScopedSupertest');
|
||||
const svlCommonApi = getService('svlCommonApi');
|
||||
|
||||
describe('disabled APIs', function () {
|
||||
let supertestAdminWithCookieCredentials: SupertestWithRoleScopeType;
|
||||
|
||||
before(async () => {
|
||||
supertestAdminWithCookieCredentials = await roleScopedSupertest.getSupertestWithRoleScope(
|
||||
'admin',
|
||||
{
|
||||
useCookieHeader: true,
|
||||
withInternalHeaders: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
it('SLO settings API is not available', async () => {
|
||||
await supertestAdminWithCookieCredentials
|
||||
.get('/internal/slo/settings')
|
||||
.set(svlCommonApi.getInternalRequestHeader())
|
||||
.expect(404);
|
||||
});
|
||||
});
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* 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 '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('logs essentials only', function () {
|
||||
loadTestFile(require.resolve('./disabled_apis'));
|
||||
});
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* 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 { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const baseTestConfig = await readConfigFile(require.resolve('../config.logs_essentials.ts'));
|
||||
|
||||
return {
|
||||
...baseTestConfig.getAll(),
|
||||
testFiles: [require.resolve('../../common/home_page')],
|
||||
junit: {
|
||||
reportName: 'Serverless Observability Logs Essentials Functional Tests - Common Group 1',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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 { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
|
||||
export default createTestConfig({
|
||||
serverlessProject: 'oblt',
|
||||
testFiles: [require.resolve('./index.logs_essentials.ts')],
|
||||
junit: {
|
||||
reportName: 'Serverless Observability Logs Essentials Functional Tests',
|
||||
},
|
||||
suiteTags: { exclude: ['skipSvlOblt'] },
|
||||
|
||||
// include settings from elasticsearch controller
|
||||
esServerArgs: ['xpack.ml.dfa.enabled=false'],
|
||||
kbnServerArgs: [
|
||||
'--xpack.dataUsage.enabled=true',
|
||||
'--xpack.dataUsage.enableExperimental=[]',
|
||||
// dataUsage.autoops* config is set in kibana controller
|
||||
'--xpack.dataUsage.autoops.enabled=true',
|
||||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--pricing.tiers.products=${JSON.stringify([
|
||||
{ name: 'observability', tier: 'logs_essentials' },
|
||||
])}`,
|
||||
],
|
||||
});
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* 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 '../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('serverless observability logs essentials UI', function () {
|
||||
this.tags(['esGate']);
|
||||
|
||||
loadTestFile(require.resolve('./logs_essentials_only'));
|
||||
loadTestFile(require.resolve('./discover/logs'));
|
||||
});
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* 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 '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('logs essentials only', function () {
|
||||
loadTestFile(require.resolve('./navigation'));
|
||||
});
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* 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 '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getPageObject, getService }: FtrProviderContext) {
|
||||
const svlObltNavigation = getService('svlObltNavigation');
|
||||
const svlCommonPage = getPageObject('svlCommonPage');
|
||||
const svlCommonNavigation = getPageObject('svlCommonNavigation');
|
||||
|
||||
describe('navigation', function () {
|
||||
before(async () => {
|
||||
await svlCommonPage.loginWithPrivilegedRole();
|
||||
await svlObltNavigation.navigateToLandingPage();
|
||||
});
|
||||
|
||||
it('does not show the SLO entry', async () => {
|
||||
await svlCommonNavigation.expectExists();
|
||||
|
||||
await svlCommonNavigation.sidenav.expectLinkMissing({
|
||||
deepLinkId: 'slo',
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue