@@ -32,15 +32,16 @@ setup_es() {
32
32
# If we're running with xpack SSL/Users enabled...
33
33
# Note that 6.3.0 releases and above do not require an x-pack plugin install
34
34
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
43
41
fi
42
+ fi
43
+
44
+ if [[ " $SECURE_INTEGRATION " == " true" ]]; then
44
45
es_yml=elasticsearch/config/elasticsearch.yml
45
46
cp -rv $BUILD_DIR /spec/fixtures/test_certs elasticsearch/config/test_certs
46
47
echo " xpack.security.http.ssl.enabled: true" >> $es_yml
@@ -58,18 +59,17 @@ start_es() {
58
59
es_url=" http://localhost:9200"
59
60
if [[ " $SECURE_INTEGRATION " == " true" ]]; then
60
61
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
73
73
fi
74
74
75
75
while ! curl --silent $es_url && [[ $count -ne 0 ]]; do
139
139
bundle exec rspec -fd $extra_tag_args --tag update_tests:painless --tag update_tests:groovy --tag es_version:$es_distribution_version $spec_path
140
140
;;
141
141
6.* )
142
- if [[ " $OSS " == " true " ]]; then
142
+ if [[ " $DISTRIBUTION " == " oss " ]]; then
143
143
setup_es https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-${ES_VERSION} .tar.gz
144
- else
144
+ elif [[ " $DISTRIBUTION " == " default " ]] ; then
145
145
setup_es https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION} .tar.gz
146
146
fi
147
147
es_distribution_version=$( get_es_distribution_version)
0 commit comments