mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
This commit is contained in:
parent
ce2b03cda7
commit
730782d40a
3 changed files with 39 additions and 2 deletions
|
@ -0,0 +1,4 @@
|
||||||
|
package_paths:
|
||||||
|
- /packages/production
|
||||||
|
- /packages/snapshot
|
||||||
|
- /packages/test-packages
|
|
@ -6,8 +6,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FtrConfigProviderContext } from '@kbn/test';
|
import { FtrConfigProviderContext } from '@kbn/test';
|
||||||
|
|
||||||
import { CA_CERT_PATH } from '@kbn/dev-utils';
|
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) {
|
async function config({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
const kibanaCommonTestsConfig = await readConfigFile(
|
const kibanaCommonTestsConfig = await readConfigFile(
|
||||||
require.resolve('../../../../test/common/config.js')
|
require.resolve('../../../../test/common/config.js')
|
||||||
|
@ -38,6 +41,11 @@ async function config({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
'--csp.warnLegacyBrowsers=false',
|
'--csp.warnLegacyBrowsers=false',
|
||||||
// define custom kibana server args here
|
// define custom kibana server args here
|
||||||
`--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`,
|
`--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}`,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,16 +5,41 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FtrConfigProviderContext } from '@kbn/test';
|
import { defineDockerServersConfig, FtrConfigProviderContext } from '@kbn/test';
|
||||||
import cypress from 'cypress';
|
import cypress from 'cypress';
|
||||||
|
import path from 'path';
|
||||||
import { cypressStart } from './cypress_start';
|
import { cypressStart } from './cypress_start';
|
||||||
|
import { packageRegistryPort } from './ftr_config';
|
||||||
import { FtrProviderContext } from './ftr_provider_context';
|
import { FtrProviderContext } from './ftr_provider_context';
|
||||||
|
|
||||||
|
export const dockerImage =
|
||||||
|
'docker.elastic.co/package-registry/distribution@sha256:13d9996dd24161624784704e080f5f5b7f0ef34ff0d9259f8f05010ccae00058';
|
||||||
|
|
||||||
async function ftrConfigRun({ readConfigFile }: FtrConfigProviderContext) {
|
async function ftrConfigRun({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
const kibanaConfig = await readConfigFile(require.resolve('./ftr_config.ts'));
|
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 {
|
return {
|
||||||
...kibanaConfig.getAll(),
|
...kibanaConfig.getAll(),
|
||||||
testRunner,
|
testRunner,
|
||||||
|
dockerServers: defineDockerServersConfig({
|
||||||
|
registry: {
|
||||||
|
enabled: true,
|
||||||
|
image: dockerImage,
|
||||||
|
portInContainer: 8080,
|
||||||
|
port: packageRegistryPort,
|
||||||
|
args: dockerArgs,
|
||||||
|
waitForLogLine: 'package manifests loaded',
|
||||||
|
},
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue