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