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

[APM] Enable APM integration e2e tests #125724

Merged
8 changes: 0 additions & 8 deletions x-pack/plugins/apm/ftr_e2e/ftr_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import { FtrConfigProviderContext } from '@kbn/test';
import { CA_CERT_PATH } from '@kbn/dev-utils';

// Used to spin up a docker container with package registry service that will be used by fleet
export const packageRegistryPort = 1234;

async function config({ readConfigFile }: FtrConfigProviderContext) {
const kibanaCommonTestsConfig = await readConfigFile(
require.resolve('../../../../test/common/config.js')
Expand Down Expand Up @@ -41,11 +38,6 @@ async function config({ readConfigFile }: FtrConfigProviderContext) {
'--csp.warnLegacyBrowsers=false',
// define custom kibana server args here
`--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`,

// Fleet config
`--xpack.fleet.packages.0.name=endpoint`,
`--xpack.fleet.packages.0.version=latest`,
`--xpack.fleet.registryUrl=http://localhost:${packageRegistryPort}`,
],
},
};
Expand Down
26 changes: 1 addition & 25 deletions x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,17 @@
* 2.0.
*/

import { defineDockerServersConfig, FtrConfigProviderContext } from '@kbn/test';
import { FtrConfigProviderContext } from '@kbn/test';
import cypress from 'cypress';
import path from 'path';
import { cypressStart } from './cypress_start';
import { packageRegistryPort } from './ftr_config';
import { FtrProviderContext } from './ftr_provider_context';

export const dockerImage =
'docker.elastic.co/package-registry/distribution@sha256:c5bf8e058727de72e561b228f4b254a14a6f880e582190d01bd5ff74318e1d0b';

async function ftrConfigRun({ readConfigFile }: FtrConfigProviderContext) {
const kibanaConfig = await readConfigFile(require.resolve('./ftr_config.ts'));

// mount the config file for the package registry
const dockerArgs: string[] = [
'-v',
`${path.join(
path.dirname(__filename),
'./apis/fixtures/package_registry_config.yml'
)}:/package-registry/config.yml`,
];

return {
...kibanaConfig.getAll(),
testRunner,
dockerServers: defineDockerServersConfig({
registry: {
enabled: true,
image: dockerImage,
portInContainer: 8080,
port: packageRegistryPort,
args: dockerArgs,
waitForLogLine: 'package manifests loaded',
},
}),
};
}

Expand Down