mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[functional_cors] use pre-defined unique port in CI (#88919)
Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
parent
07002d691b
commit
208ae0d2a4
3 changed files with 7 additions and 2 deletions
|
@ -48,6 +48,7 @@ else
|
|||
fi
|
||||
|
||||
tc_set_env FLEET_PACKAGE_REGISTRY_PORT 6104 # Any unused port is fine, used by ingest manager tests
|
||||
tc_set_env TEST_CORS_SERVER_PORT 6105 # Any unused port is fine, used by ingest manager tests
|
||||
|
||||
if [[ "$(which google-chrome-stable)" || "$(which google-chrome)" ]]; then
|
||||
echo "Chrome detected, setting DETECT_CHROMEDRIVER_VERSION=true"
|
||||
|
|
|
@ -89,6 +89,7 @@ def withFunctionalTestEnv(List additionalEnvs = [], Closure closure) {
|
|||
def esTransportPort = "61${parallelId}3"
|
||||
def fleetPackageRegistryPort = "61${parallelId}4"
|
||||
def alertingProxyPort = "61${parallelId}5"
|
||||
def corsTestServerPort = "61${parallelId}6"
|
||||
def apmActive = githubPr.isPr() ? "false" : "true"
|
||||
|
||||
withEnv([
|
||||
|
@ -100,6 +101,7 @@ def withFunctionalTestEnv(List additionalEnvs = [], Closure closure) {
|
|||
"TEST_KIBANA_URL=http://elastic:changeme@localhost:${kibanaPort}",
|
||||
"TEST_ES_URL=http://elastic:changeme@localhost:${esPort}",
|
||||
"TEST_ES_TRANSPORT_PORT=${esTransportPort}",
|
||||
"TEST_CORS_SERVER_PORT=${corsTestServerPort}",
|
||||
"KBN_NP_PLUGINS_BUILT=true",
|
||||
"FLEET_PACKAGE_REGISTRY_PORT=${fleetPackageRegistryPort}",
|
||||
"ALERTING_PROXY_PORT=${alertingProxyPort}",
|
||||
|
|
|
@ -6,11 +6,14 @@
|
|||
|
||||
import Url from 'url';
|
||||
import Path from 'path';
|
||||
import getPort from 'get-port';
|
||||
import type { FtrConfigProviderContext } from '@kbn/test/types/ftr';
|
||||
import { kbnTestConfig } from '@kbn/test';
|
||||
import { pageObjects } from '../functional/page_objects';
|
||||
|
||||
const pluginPort = process.env.TEST_CORS_SERVER_PORT
|
||||
? parseInt(process.env.TEST_CORS_SERVER_PORT, 10)
|
||||
: 5699;
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const kibanaFunctionalConfig = await readConfigFile(require.resolve('../functional/config.js'));
|
||||
|
||||
|
@ -27,7 +30,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
};
|
||||
|
||||
const { protocol, hostname } = kbnTestConfig.getUrlParts();
|
||||
const pluginPort = await getPort();
|
||||
const originUrl = Url.format({
|
||||
protocol,
|
||||
hostname,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue