mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Co-authored-by: Yuliia Naumenko <jo.naumenko@gmail.com> Co-authored-by: Thomas Watson <w@tson.dk> Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
42 lines
1.5 KiB
TypeScript
42 lines
1.5 KiB
TypeScript
/*
|
|
* 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 Url from 'url';
|
|
|
|
import { FtrProviderContext } from './ftr_provider_context';
|
|
|
|
export async function FleetCypressCliTestRunner(context: FtrProviderContext) {
|
|
await startFleetCypress(context, 'run');
|
|
}
|
|
|
|
export async function FleetCypressVisualTestRunner(context: FtrProviderContext) {
|
|
await startFleetCypress(context, 'open');
|
|
}
|
|
|
|
function startFleetCypress(context: FtrProviderContext, cypressCommand: string) {
|
|
const config = context.getService('config');
|
|
|
|
return {
|
|
FORCE_COLOR: '1',
|
|
baseUrl: Url.format({
|
|
protocol: config.get('servers.kibana.protocol'),
|
|
hostname: config.get('servers.kibana.hostname'),
|
|
port: config.get('servers.kibana.port'),
|
|
}),
|
|
protocol: config.get('servers.kibana.protocol'),
|
|
hostname: config.get('servers.kibana.hostname'),
|
|
configport: config.get('servers.kibana.port'),
|
|
ELASTICSEARCH_URL: Url.format(config.get('servers.elasticsearch')),
|
|
ELASTICSEARCH_USERNAME: config.get('servers.kibana.username'),
|
|
ELASTICSEARCH_PASSWORD: config.get('servers.kibana.password'),
|
|
KIBANA_URL: Url.format({
|
|
protocol: config.get('servers.kibana.protocol'),
|
|
hostname: config.get('servers.kibana.hostname'),
|
|
port: config.get('servers.kibana.port'),
|
|
}),
|
|
};
|
|
}
|