Skip to content

Commit 677df0a

Browse files
committed
Add 6.0 to the testing matrix
This also modifies the way that test users are added to simplify things Fixes logstash-plugins#625
1 parent e97f060 commit 677df0a

File tree

2 files changed

+18
-23
lines changed

2 files changed

+18
-23
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ env:
99
- INTEGRATION=true ES_VERSION=5.5.0 TEST_DEBUG=true
1010
- INTEGRATION=true ES_VERSION=master TEST_DEBUG=true
1111
- SECURE_INTEGRATION=true INTEGRATION=true ES_VERSION=5.5.0 TEST_DEBUG=true
12+
- INTEGRATION=true ES_VERSION=6.0.0-beta1 TEST_DEBUG=true
13+
- SECURE_INTEGRATION=true INTEGRATION=true ES_VERSION=6.0.0-beta1 TEST_DEBUG=true
1214
rvm:
1315
- jruby-1.7.25
1416
matrix:

ci/run.sh

+16-23
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ trap finish EXIT
1818

1919
setup_es() {
2020
download_url=$1
21+
xpack_download_url=$2
2122
if [[ ! -d elasticsearch ]]; then
2223
curl -sL $download_url > elasticsearch.tar.gz
2324
mkdir elasticsearch
@@ -30,7 +31,12 @@ setup_es() {
3031

3132
# If we're running with xpack SSL/Users enabled...
3233
if [[ "$SECURE_INTEGRATION" == "true" ]]; then
33-
yes y | elasticsearch/bin/elasticsearch-plugin install x-pack
34+
if [[ "$xpack_download_url" == "" ]]; then
35+
yes y | elasticsearch/bin/elasticsearch-plugin install x-pack
36+
else
37+
curl -sL $xpack_download_url > elasticsearch/xpack.zip
38+
yes y | elasticsearch/bin/elasticsearch-plugin install file://$BUILD_DIR/elasticsearch/xpack.zip
39+
fi
3440

3541
es_yml=elasticsearch/config/elasticsearch.yml
3642
cp -rv $BUILD_DIR/spec/fixtures/test_certs elasticsearch/config/test_certs
@@ -49,6 +55,9 @@ start_es() {
4955
es_url="http://localhost:9200"
5056
if [[ "$SECURE_INTEGRATION" == "true" ]]; then
5157
es_url="https://localhost:9200 -k"
58+
59+
elasticsearch/bin/x-pack/users useradd simpleuser -p abc123 -r superuser
60+
elasticsearch/bin/x-pack/users useradd 'f@ncyuser' -p 'ab%12#' -r superuser
5261
fi
5362

5463
while ! curl --silent $es_url && [[ $count -ne 0 ]]; do
@@ -58,28 +67,6 @@ start_es() {
5867
done
5968
echo "Elasticsearch is Up !"
6069

61-
if [[ "$SECURE_INTEGRATION" == "true" ]]; then
62-
curl -XPUT -k 'https://elastic:changeme@localhost:9200/_xpack/security/user/elastic/_password' -H "Content-Type: application/json" -d '{
63-
"password" : "testpass"
64-
}'
65-
66-
# These are the two users used for secure integration tests
67-
curl -XPOST -k 'https://elastic:testpass@localhost:9200/_xpack/security/user/simpleuser' -H "Content-Type: application/json" -d '{
68-
"password" : "abc123",
69-
"full_name" : "John Doe",
70-
"email" : "john.doe@anony.mous",
71-
"roles" : [ "superuser" ]
72-
}'
73-
74-
curl -XPOST -k 'https://elastic:testpass@localhost:9200/_xpack/security/user/f%40ncyuser' -H "Content-Type: application/json" -d '{
75-
"password" : "ab%12#",
76-
"full_name" : "John Doe",
77-
"email" : "john.doe@anony.mous",
78-
"roles" : [ "superuser" ]
79-
}'
80-
81-
fi
82-
8370
return 0
8471
}
8572

@@ -128,6 +115,12 @@ else
128115
fi
129116

130117
case "$ES_VERSION" in
118+
6.*)
119+
setup_es https://snapshots.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}-SNAPSHOT.tar.gz https://snapshots.elastic.co/downloads/packs/x-pack/x-pack-$ES_VERSION-SNAPSHOT.zip
120+
start_es
121+
# Run all tests which are for versions > 5 but don't run ones tagged < 5.x. Include ingest, new template
122+
bundle exec rspec -fd $extra_tag_args --tag version_greater_than_equal_to_5x --tag update_tests:painless --tag update_tests:groovy --tag ~version_less_than_5x $spec_path
123+
;;
131124
5.*)
132125
setup_es https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
133126
start_es -Escript.inline=true -Escript.stored=true -Escript.file=true

0 commit comments

Comments
 (0)