@@ -32,15 +32,16 @@ setup_es() {
3232 # If we're running with xpack SSL/Users enabled...
3333 # Note that 6.3.0 releases and above do not require an x-pack plugin install
3434
35- if [[ " $SECURE_INTEGRATION " == " true" ]]; then
36- if [[ -z " $OSS " ]]; then
37- if [[ " $xpack_download_url " == " " ]]; then
38- yes y | elasticsearch/bin/elasticsearch-plugin install x-pack
39- else
40- curl -sL $xpack_download_url > elasticsearch/xpack.zip
41- yes y | elasticsearch/bin/elasticsearch-plugin install file://$BUILD_DIR /elasticsearch/xpack.zip
42- fi
35+ if [[ " $DISTRIBUTION " == " legacyxpack" ]]; then
36+ if [[ " $xpack_download_url " == " " ]]; then
37+ yes y | elasticsearch/bin/elasticsearch-plugin install x-pack
38+ else
39+ curl -sL $xpack_download_url > elasticsearch/xpack.zip
40+ yes y | elasticsearch/bin/elasticsearch-plugin install file://$BUILD_DIR /elasticsearch/xpack.zip
4341 fi
42+ fi
43+
44+ if [[ " $SECURE_INTEGRATION " == " true" ]]; then
4445 es_yml=elasticsearch/config/elasticsearch.yml
4546 cp -rv $BUILD_DIR /spec/fixtures/test_certs elasticsearch/config/test_certs
4647 echo " xpack.security.http.ssl.enabled: true" >> $es_yml
@@ -58,18 +59,17 @@ start_es() {
5859 es_url=" http://localhost:9200"
5960 if [[ " $SECURE_INTEGRATION " == " true" ]]; then
6061 es_url=" https://localhost:9200 -k"
61-
62- # Needed for travis. On travis the `users` script will fail because it will first try and write
63- # to /etc/elasticsearch
64- export CONF_DIR=$BUILD_DIR /elasticsearch/config
65-
66- if [[ " $OSS " == " false" ]]; then
67- elasticsearch/bin/elasticsearch-users useradd simpleuser -p abc123 -r superuser
68- elasticsearch/bin/elasticsearch-users useradd ' f@ncyuser' -p ' ab%12#' -r superuser
69- else
70- elasticsearch/bin/x-pack/users useradd simpleuser -p abc123 -r superuser
71- elasticsearch/bin/x-pack/users useradd ' f@ncyuser' -p ' ab%12#' -r superuser
72- fi
62+ fi
63+ # Needed for travis. On travis the `users` script will fail because it will first try and write
64+ # to /etc/elasticsearch
65+ export CONF_DIR=$BUILD_DIR /elasticsearch/config
66+
67+ if [[ " $DISTRIBUTION " == " default" ]]; then
68+ elasticsearch/bin/elasticsearch-users useradd simpleuser -p abc123 -r superuser
69+ elasticsearch/bin/elasticsearch-users useradd ' f@ncyuser' -p ' ab%12#' -r superuser
70+ elif [[ " $DISTRIBUTION " == " legacyxpack" ]]; then
71+ elasticsearch/bin/x-pack/users useradd simpleuser -p abc123 -r superuser
72+ elasticsearch/bin/x-pack/users useradd ' f@ncyuser' -p ' ab%12#' -r superuser
7373 fi
7474
7575 while ! curl --silent $es_url && [[ $count -ne 0 ]]; do
139139 bundle exec rspec -fd $extra_tag_args --tag update_tests:painless --tag update_tests:groovy --tag es_version:$es_distribution_version $spec_path
140140 ;;
141141 6.* )
142- if [[ " $OSS " == " true " ]]; then
142+ if [[ " $DISTRIBUTION " == " oss " ]]; then
143143 setup_es https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-${ES_VERSION} .tar.gz
144- else
144+ elif [[ " $DISTRIBUTION " == " default " ]] ; then
145145 setup_es https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION} .tar.gz
146146 fi
147147 es_distribution_version=$( get_es_distribution_version)
0 commit comments