Update integration test scripts (#1525)
* Updated scripts * Update runner
This commit is contained in:
committed by
GitHub
parent
969decde28
commit
4ae38ca7f0
@ -26,10 +26,11 @@ if [[ -z $es_node_name ]]; then
|
||||
export es_node_name=instance
|
||||
export elastic_password=changeme
|
||||
export elasticsearch_image=elasticsearch
|
||||
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
|
||||
export elasticsearch_scheme="https"
|
||||
if [[ $TEST_SUITE != "platinum" ]]; then
|
||||
export elasticsearch_url=http://${es_node_name}:9200
|
||||
export elasticsearch_scheme="http"
|
||||
fi
|
||||
export elasticsearch_url=${elasticsearch_scheme}://elastic:${elastic_password}@${es_node_name}:9200
|
||||
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
|
||||
export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}"
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
|
||||
# Export the NUMBER_OF_NODES variable to start more than 1 node
|
||||
|
||||
# Version 1.4.0
|
||||
# Version 1.5.0
|
||||
# - Initial version of the run-elasticsearch.sh script
|
||||
# - Deleting the volume should not dependent on the container still running
|
||||
# - Fixed `ES_JAVA_OPTS` config
|
||||
@ -18,6 +18,7 @@
|
||||
# - Added flags to make local CCR configurations work
|
||||
# - Added action.destructive_requires_name=false as the default will be true in v8
|
||||
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
|
||||
# - Moved ELASTIC_PASSWORD to the base arguments for "Security On by default"
|
||||
|
||||
script_path=$(dirname $(realpath -s $0))
|
||||
source $script_path/functions/imports.sh
|
||||
@ -31,6 +32,7 @@ cluster_name=${moniker}${suffix}
|
||||
|
||||
declare -a volumes
|
||||
environment=($(cat <<-END
|
||||
--env ELASTIC_PASSWORD=$elastic_password
|
||||
--env node.name=$es_node_name
|
||||
--env cluster.name=$cluster_name
|
||||
--env cluster.initial_master_nodes=$master_node_name
|
||||
@ -46,7 +48,6 @@ END
|
||||
))
|
||||
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
||||
environment+=($(cat <<-END
|
||||
--env ELASTIC_PASSWORD=$elastic_password
|
||||
--env xpack.license.self_generated.type=trial
|
||||
--env xpack.security.enabled=true
|
||||
--env xpack.security.http.ssl.enabled=true
|
||||
|
||||
@ -38,6 +38,7 @@ fi
|
||||
docker run \
|
||||
--network=${network_name} \
|
||||
--env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \
|
||||
--env "TEST_SUITE=${TEST_SUITE}" \
|
||||
--volume $repo:/usr/src/app \
|
||||
--volume /usr/src/app/node_modules \
|
||||
--name elasticsearch-js \
|
||||
|
||||
@ -337,10 +337,10 @@ function generateJunitXmlReport (junit, suite) {
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
const node = process.env.TEST_ES_SERVER || 'http://localhost:9200'
|
||||
const node = process.env.TEST_ES_SERVER || 'https://elastic:changeme@localhost:9200'
|
||||
const opts = {
|
||||
node,
|
||||
isXPack: node.indexOf('@') > -1
|
||||
isXPack: process.env.TEST_SUITE !== 'free'
|
||||
}
|
||||
runner(opts)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user