Skip to content

Commit 7371329

Browse files
committed
[CI] Update test suite names
1 parent ecac915 commit 7371329

File tree

7 files changed

+27
-25
lines changed

7 files changed

+27
-25
lines changed

.ci/DockerFile

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ COPY elasticsearch/src ./elasticsearch/src
2828
COPY elasticsearch/build.rs ./elasticsearch/build.rs
2929
COPY yaml_test_runner ./yaml_test_runner
3030

31-
RUN cargo build --tests
31+
RUN cargo build --tests

.ci/functions/imports.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require_stack_version
1818
if [[ -z $es_node_name ]]; then
1919
# only set these once
2020
set -euo pipefail
21-
export TEST_SUITE=${TEST_SUITE-oss}
21+
export TEST_SUITE=${TEST_SUITE-free}
2222
export RUNSCRIPTS=${RUNSCRIPTS-}
2323
export DETACH=${DETACH-false}
2424
export CLEANUP=${CLEANUP-false}
@@ -27,8 +27,7 @@ if [[ -z $es_node_name ]]; then
2727
export elastic_password=changeme
2828
export elasticsearch_image=elasticsearch
2929
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
30-
if [[ $TEST_SUITE != "xpack" ]]; then
31-
export elasticsearch_image=elasticsearch-${TEST_SUITE}
30+
if [[ $TEST_SUITE != "platinum" ]]; then
3231
export elasticsearch_url=http://${es_node_name}:9200
3332
fi
3433
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}

.ci/run-elasticsearch.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# to form a cluster suitable for running the REST API tests.
55
#
66
# Export the STACK_VERSION variable, eg. '8.0.0-SNAPSHOT'.
7-
# Export the TEST_SUITE variable, eg. 'oss' or 'xpack' defaults to 'oss'.
7+
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
88
# Export the NUMBER_OF_NODES variable to start more than 1 node
99

1010
# Version 1.1.0
@@ -38,7 +38,7 @@ environment=($(cat <<-END
3838
--env repositories.url.allowed_urls=http://snapshot.test*
3939
END
4040
))
41-
if [[ "$TEST_SUITE" == "xpack" ]]; then
41+
if [[ "$TEST_SUITE" == "platinum" ]]; then
4242
environment+=($(cat <<-END
4343
--env ELASTIC_PASSWORD=$elastic_password
4444
--env xpack.license.self_generated.type=trial
@@ -63,7 +63,7 @@ END
6363
fi
6464

6565
cert_validation_flags=""
66-
if [[ "$TEST_SUITE" == "xpack" ]]; then
66+
if [[ "$TEST_SUITE" == "platinum" ]]; then
6767
cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1"
6868
fi
6969

.ci/run-repository.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
# STACK_VERSION -- version e.g Major.Minor.Patch(-Prelease)
6-
# TEST_SUITE -- which test suite to run: oss or xpack
6+
# TEST_SUITE -- which test suite to run: free or platinum
77
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE
88
# RUST_TOOLCHAIN -- Rust toolchain version to compile and run tests
99
script_path=$(dirname $(realpath -s $0))

.ci/test-matrix.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ STACK_VERSION:
44
- 8.0.0-SNAPSHOT
55

66
TEST_SUITE:
7-
- oss
8-
- xpack
7+
- free
8+
- platinum
99

1010
RUST_TOOLCHAIN:
1111
- latest

.dockerignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ target
66
docs
77
.vscode
88
.idea
9+
*.iml
910

1011
api_generator/src/bin
1112

1213
yaml_test_runner/tests
13-
!yaml_test_runner/tests/common
14+
!yaml_test_runner/tests/common

Makefile.toml

+16-14
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ default_to_workspace = false
44
[env]
55
# Determines the version of Elasticsearch docker container used
66
STACK_VERSION = "8.0.0-SNAPSHOT"
7-
# Determines the distribution of docker container used. Either xpack or oss
8-
TEST_SUITE = "xpack"
7+
# Determines the distribution of docker container used. Either platinum or free
8+
TEST_SUITE = "platinum"
99
# Set publish flags to dry-run by default, to force user to explicitly define for publishing
1010
CARGO_MAKE_CARGO_PUBLISH_FLAGS = "--dry-run"
1111

12-
[tasks.set-oss-env]
12+
[tasks.set-free-env]
1313
category = "Elasticsearch"
14-
description = "Sets ELASTICSEARCH_URL environment variable if not already set for later tasks when oss test suite used"
14+
description = "Sets ELASTICSEARCH_URL environment variable if not already set for later tasks when free test suite used"
1515
private = true
16-
condition = { env = { "TEST_SUITE" = "oss" }, env_not_set = ["ELASTICSEARCH_URL"] }
16+
condition = { env = { "TEST_SUITE" = "free" }, env_not_set = ["ELASTICSEARCH_URL"] }
1717
env = { "ELASTICSEARCH_URL" = "http://localhost:9200" }
1818

19-
[tasks.set-xpack-env]
19+
[tasks.set-platinum-env]
2020
category = "Elasticsearch"
21-
description = "Sets ELASTICSEARCH_URL environment variable if not already set for later tasks when xpack test suite used"
21+
description = "Sets ELASTICSEARCH_URL environment variable if not already set for later tasks when platinum test suite used"
2222
private = true
23-
condition = { env = { "TEST_SUITE" = "xpack" }, env_not_set = ["ELASTICSEARCH_URL"] }
23+
condition = { env = { "TEST_SUITE" = "platinum" }, env_not_set = ["ELASTICSEARCH_URL"] }
2424
env = { "ELASTICSEARCH_URL" = "https://elastic:changeme@localhost:9200" }
2525

2626
[tasks.run-yaml-test-runner]
@@ -52,7 +52,7 @@ dependencies = ["generate-yaml-tests"]
5252
[tasks.test-elasticsearch]
5353
category = "Elasticsearch"
5454
private = true
55-
condition = { env_set = [ "ELASTICSEARCH_URL" ], env = { "TEST_SUITE" = "xpack" } }
55+
condition = { env_set = [ "ELASTICSEARCH_URL" ], env = { "TEST_SUITE" = "platinum" } }
5656
command = "cargo"
5757
args = ["test", "-p", "elasticsearch"]
5858
dependencies = ["start-elasticsearch"]
@@ -85,7 +85,7 @@ dependencies = ["install-cargo2junit"]
8585
category = "Elasticsearch"
8686
private = true
8787
condition = { env_set = [ "STACK_VERSION", "TEST_SUITE" ], env_false = ["CARGO_MAKE_CI"] }
88-
dependencies = ["set-oss-env", "set-xpack-env"]
88+
dependencies = ["set-free-env", "set-platinum-env"]
8989

9090
[tasks.run-elasticsearch.linux]
9191
command = "./.ci/run-elasticsearch.sh"
@@ -120,17 +120,19 @@ exec cargo publish %{CARGO_MAKE_CARGO_PUBLISH_FLAGS}
120120

121121
[tasks.start-elasticsearch]
122122
extend = "run-elasticsearch"
123+
private = false
123124
description = "Starts Elasticsearch docker container with the given version and distribution"
124125
env = { "CLEANUP" = false, "DETACH" = true }
125126

126127
[tasks.stop-elasticsearch]
127128
extend = "run-elasticsearch"
129+
private = false
128130
description = "Stops Elasticsearch docker container, if running"
129131
env = { "CLEANUP" = true, "DETACH" = false }
130132

131133
[tasks.test-yaml]
132134
category = "Elasticsearch"
133-
description = "Generates and runs yaml_test_runner package xpack/oss tests against a given Elasticsearch version"
135+
description = "Generates and runs yaml_test_runner package platinum/free tests against a given Elasticsearch version"
134136
condition = { env_set = [ "STACK_VERSION", "TEST_SUITE" ] }
135137
dependencies = ["generate-yaml-tests", "create-test-results-dir", "test-yaml-test-runner", "test-yaml-test-runner-ci", "convert-test-results-junit"]
136138
run_task = "stop-elasticsearch"
@@ -146,7 +148,7 @@ args = ["test", "-p", "api_generator"]
146148
category = "Elasticsearch"
147149
clear = true
148150
description = "Runs elasticsearch package tests against a given Elasticsearch version"
149-
env = { "TEST_SUITE" = { value = "xpack", condition = { env_set = ["TEST_SUITE"] } } }
151+
env = { "TEST_SUITE" = { value = "platinum", condition = { env_set = ["TEST_SUITE"] } } }
150152
dependencies = ["test-elasticsearch"]
151153
run_task = "stop-elasticsearch"
152154

@@ -217,7 +219,7 @@ script = ['''
217219
echo - start-elasticsearch: Starts Elasticsearch docker container with the given version and distribution
218220
echo - stop-elasticsearch: Stops Elasticsearch docker container, if running
219221
echo
220-
echo - test-yaml: Generates and runs yaml_test_runner package xpack/oss tests against a given Elasticsearch version
222+
echo - test-yaml: Generates and runs yaml_test_runner package platinum/free tests against a given Elasticsearch version
221223
echo - test-generator: Generates and runs api_generator package tests
222224
echo - test: Runs elasticsearch package tests against a given Elasticsearch version
223225
echo
@@ -230,7 +232,7 @@ script = ['''
230232
echo
231233
echo Most tasks use these environment variables:
232234
echo - STACK_VERSION (default '${STACK_VERSION}'): the version of Elasticsearch
233-
echo - TEST_SUITE ('oss' or 'xpack', default '${TEST_SUITE}'): the distribution of Elasticsearch
235+
echo - TEST_SUITE ('free' or 'platinum', default '${TEST_SUITE}'): the distribution of Elasticsearch
234236
echo - CI (default not set): set when running on CI to determine whether to start Elasticsearch and format test output as JSON
235237
echo
236238
echo Run 'cargo make --list-all-steps' for a complete list of available tasks.

0 commit comments

Comments
 (0)