Skip to content

Updated integration test cleanup #1438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .ci/run-elasticsearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
# 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.2.0
# Version 1.3.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
# - Moved to STACK_VERSION and TEST_VERSION
# - Refactored into functions and imports
# - Support NUMBER_OF_NODES
# - Added 5 retries on docker pull for fixing transient network errors
# - Added flags to make local CCR configurations work
# - Added action.destructive_requires_name=false as the default will be true in v8

script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
Expand All @@ -37,6 +39,7 @@ environment=($(cat <<-END
--env node.attr.testattr=test
--env path.repo=/tmp
--env repositories.url.allowed_urls=http://snapshot.test*
--env action.destructive_requires_name=false
END
))
if [[ "$TEST_SUITE" == "platinum" ]]; then
Expand All @@ -50,6 +53,7 @@ if [[ "$TEST_SUITE" == "platinum" ]]; then
--env xpack.security.http.ssl.certificate=certs/testnode.crt
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
--env xpack.security.transport.ssl.enabled=true
--env xpack.security.transport.ssl.verification_mode=certificate
--env xpack.security.transport.ssl.key=certs/testnode.key
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
Expand Down Expand Up @@ -104,7 +108,7 @@ END
docker run \
--name "$node_name" \
--network "$network_name" \
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g -da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions" \
"${environment[@]}" \
"${volumes[@]}" \
--publish "$http_port":9200 \
Expand Down
2 changes: 2 additions & 0 deletions scripts/es-docker-platinum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if [ "$1" == "--detach" ]; then
-e "path.repo=/tmp" \
-e "repositories.url.allowed_urls=http://snapshot.*" \
-e "discovery.type=single-node" \
-e "action.destructive_requires_name=false" \
-e "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
-e "ELASTIC_PASSWORD=changeme" \
-e "xpack.security.enabled=true" \
Expand Down Expand Up @@ -52,6 +53,7 @@ else
-e "path.repo=/tmp" \
-e "repositories.url.allowed_urls=http://snapshot.*" \
-e "discovery.type=single-node" \
-e "action.destructive_requires_name=false" \
-e "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
-e "ELASTIC_PASSWORD=changeme" \
-e "xpack.security.enabled=true" \
Expand Down
2 changes: 2 additions & 0 deletions scripts/es-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [ "$1" == "--detach" ]; then
-e "path.repo=/tmp" \
-e "repositories.url.allowed_urls=http://snapshot.*" \
-e "discovery.type=single-node" \
-e "action.destructive_requires_name=false" \
-p 9200:9200 \
--detach \
--network=elastic \
Expand All @@ -31,6 +32,7 @@ else
-e "path.repo=/tmp" \
-e "repositories.url.allowed_urls=http://snapshot.*" \
-e "discovery.type=single-node" \
-e "action.destructive_requires_name=false" \
-p 9200:9200 \
--network=elastic \
--name=elasticsearch \
Expand Down