Skip to content
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
1 change: 1 addition & 0 deletions .buildkite/ftr_oblt_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ enabled:
- x-pack/solutions/observability/test/serverless/functional/configs/config.cases_and_rules.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.ml_and_discover.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.onboarding.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.examples.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.feature_flags.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.saved_objects_management.ts
Expand Down
11 changes: 10 additions & 1 deletion x-pack/platform/test/serverless/api_integration/config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import type { FtrConfigProviderContext } from '@kbn/test';
import { dockerRegistryPort, type FtrConfigProviderContext } from '@kbn/test';
import { ScoutTestRunConfigCategory } from '@kbn/scout-info';

import { MOCK_IDP_UIAM_SERVICE_URL, MOCK_IDP_UIAM_SHARED_SECRET } from '@kbn/mock-idp-utils';
Expand All @@ -14,6 +14,8 @@ import type { CreateTestConfigOptions } from '../shared/types';
export function createTestConfig(options: CreateTestConfigOptions) {
return async ({ readConfigFile }: FtrConfigProviderContext) => {
const svlSharedConfig = await readConfigFile(require.resolve('../shared/config.base.ts'));
const enableFleetDockerRegistry = options.enableFleetDockerRegistry ?? true;
const dockerServers = svlSharedConfig.get('dockerServers');

return {
...svlSharedConfig.getAll(),
Expand All @@ -23,6 +25,10 @@ export function createTestConfig(options: CreateTestConfigOptions) {
...services,
...options.services,
},
dockerServers:
!enableFleetDockerRegistry && dockerServers?.registry
? { ...dockerServers, registry: { ...dockerServers.registry, enabled: false } }
: dockerServers,
esTestCluster: {
...svlSharedConfig.get('esTestCluster'),
serverArgs: [
Expand All @@ -49,6 +55,9 @@ export function createTestConfig(options: CreateTestConfigOptions) {
`--xpack.security.uiam.sharedSecret=${MOCK_IDP_UIAM_SHARED_SECRET}`,
]
: []),
...(enableFleetDockerRegistry && dockerRegistryPort
? [`--xpack.fleet.registryUrl=http://localhost:${dockerRegistryPort}`]
: []),
],
},
testFiles: options.testFiles,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ export default createTestConfig({
// Enables /internal/cloud_security_posture/graph API
`--uiSettings.overrides.securitySolution:enableGraphVisualization=true`,
],
enableFleetDockerRegistry: false,
});
13 changes: 11 additions & 2 deletions x-pack/platform/test/serverless/functional/config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import type { FtrConfigProviderContext } from '@kbn/test';
import { dockerRegistryPort, type FtrConfigProviderContext } from '@kbn/test';
import { ScoutTestRunConfigCategory } from '@kbn/scout-info';
import { resolve } from 'path';
import { pageObjects } from './page_objects';
Expand All @@ -19,9 +19,15 @@ export function createTestConfig<
return async ({ readConfigFile }: FtrConfigProviderContext) => {
const svlSharedConfig = await readConfigFile(require.resolve('../shared/config.base.ts'));

const enableFleetDockerRegistry = options.enableFleetDockerRegistry ?? true;
const dockerServers = svlSharedConfig.get('dockerServers');

return {
...svlSharedConfig.getAll(),

dockerServers:
!enableFleetDockerRegistry && dockerServers?.registry
? { ...dockerServers, registry: { ...dockerServers.registry, enabled: false } }
: dockerServers,
testConfigCategory: ScoutTestRunConfigCategory.UI_TEST,
pageObjects: { ...pageObjects, ...options.pageObjects },
services: { ...services, ...options.services },
Expand All @@ -41,6 +47,9 @@ export function createTestConfig<
...(options.kbnServerArgs ?? []),
// Disable tours globally for all tests
'--uiSettings.globalOverrides.hideAnnouncements=true',
...(enableFleetDockerRegistry && dockerRegistryPort
? [`--xpack.fleet.registryUrl=http://localhost:${dockerRegistryPort}`]
: []),
],
},
testFiles: options.testFiles,
Expand Down
1 change: 1 addition & 0 deletions x-pack/platform/test/serverless/shared/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ export interface CreateTestConfigOptions<
apps?: Record<string, { pathname: string; hash?: string }>;
screenshots?: { directory: string };
indexRefreshInterval?: string | false;
enableFleetDockerRegistry?: boolean;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* 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 '@kbn/test-suites-xpack-platform/serverless/functional/config.base';
import { pageObjects } from '../page_objects';
import { services } from '../services';

export default createTestConfig({
serverlessProject: 'oblt',
services,
pageObjects,
testFiles: [require.resolve('./index.onboarding.ts')],
junit: {
reportName: 'Serverless Observability Onboarding Functional Tests',
},
suiteTags: { exclude: ['skipSvlOblt'] },

// include settings from project controller
esServerArgs: [],
kbnServerArgs: [],
enableFleetDockerRegistry: false,
});
Original file line number Diff line number Diff line change
@@ -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 type { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('serverless observability UI - onboarding', function () {
this.tags(['esGate']);

loadTestFile(require.resolve('../test_suites/onboarding'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function ({ loadTestFile }: FtrProviderContext) {

loadTestFile(require.resolve('../test_suites/navigation'));
loadTestFile(require.resolve('../test_suites/dataset_quality'));
loadTestFile(require.resolve('../test_suites/onboarding'));
loadTestFile(require.resolve('../test_suites/role_management'));
loadTestFile(require.resolve('../test_suites/advanced_settings'));
loadTestFile(require.resolve('../test_suites/privileges'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ export default createTestConfig({
// Enables /internal/cloud_security_posture/graph API
`--uiSettings.overrides.securitySolution:enableGraphVisualization=true`,
],
enableFleetDockerRegistry: false,
});
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ export default createTestConfig({
],
// load tests in the index file
testFiles: [require.resolve('../test_suites/ftr/cloud_security_posture/agentless')],
enableFleetDockerRegistry: false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test suite needs Fleet Registry to load an integration. Could this be why I am seeing E2E test failures for cloud_security_posture/agentless?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanrathier they do need it but not the dockerized version of the registry, that is why I set this to false here. The failure is due to something else I am working on it now and will keep you posted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanrathier issue fixed in this commit 👍

});
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export default createTestConfig({
],
// load tests in the index file
testFiles: [require.resolve('../test_suites/ftr/cloud_security_posture')],
enableFleetDockerRegistry: false,
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ export default createTestConfig({

// load tests in the index file
testFiles: [require.resolve('../test_suites/ftr/cloud_security_posture/cloud_tests')],
enableFleetDockerRegistry: false,
});
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ export default createTestConfig({
require.resolve('../test_suites/ftr/cloud_security_posture/graph_alerts_flyout'),
require.resolve('../test_suites/ftr/cloud_security_posture/graph_events_flyout'),
],
enableFleetDockerRegistry: false,
});
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ export default createTestConfig({
'../test_suites/ftr/cloud_security_posture/csp_integrations_form.essentials.ts'
),
],
enableFleetDockerRegistry: false,
});
Loading