Skip to content

Commit adefd3a

Browse files
authored
fix: es functional tests (#196)
* fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix
1 parent 916006e commit adefd3a

17 files changed

Lines changed: 689 additions & 102 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ steps:
2020
matrix:
2121
setup:
2222
node:
23-
- "20"
2423
- "22"
2524
- "24"
2625
agents:
2726
provider: gcp
2827
image: family/core-ubuntu-2204
2928
env:
3029
NODE_VERSION: "{{matrix.node}}"
31-
STACK_VERSION: "9.1.0"
30+
STACK_VERSION: "9.3.0"
3231
command: ".buildkite/run-es-tests.sh"
3332

3433
- group: "Cloud Smoke Tests"
@@ -38,8 +37,8 @@ steps:
3837
matrix:
3938
setup:
4039
node:
41-
- "20"
4240
- "22"
41+
- "24"
4342
agents:
4443
provider: gcp
4544
image: family/core-ubuntu-2204

.buildkite/run-es-tests.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
set -euo pipefail
1010

11-
STACK_VERSION="${STACK_VERSION:-9.1.0}"
11+
STACK_VERSION="${STACK_VERSION:-9.3.0}"
1212
ES_CONTAINER_NAME="elastic-cli-es-test"
1313
NETWORK_NAME="elastic-cli-test-net"
1414
TESTS_REPO="https://github.com/elastic/elasticsearch-clients-tests.git"
@@ -40,8 +40,6 @@ npm ci
4040

4141
echo "--- Building CLI"
4242
npm run build
43-
44-
echo "--- Linking elastic binary onto PATH"
4543
npm link
4644

4745
echo "--- Cloning elasticsearch-clients-tests"
@@ -56,6 +54,7 @@ docker run \
5654
--publish 9200:9200 \
5755
--env "discovery.type=single-node" \
5856
--env "xpack.security.enabled=false" \
57+
--env "xpack.license.self_generated.type=trial" \
5958
--env "action.destructive_requires_name=false" \
6059
--env "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
6160
--detach \
@@ -80,14 +79,16 @@ until curl -sf http://localhost:9200/_cluster/health > /dev/null 2>&1; do
8079
done
8180
echo "Elasticsearch is ready"
8281

83-
echo "--- Generating .elasticrc.yml for ES"
84-
cat > .elasticrc.yml <<EOF
82+
echo "--- Generating CI config file"
83+
CI_CONFIG_FILE="$(pwd)/.elasticrc-ci.yml"
84+
cat > "$CI_CONFIG_FILE" <<EOF
8585
contexts:
8686
ci:
87-
es:
87+
elasticsearch:
8888
url: http://localhost:9200
8989
current_context: ci
9090
EOF
91+
export ELASTIC_CLI_CONFIG_FILE="$CI_CONFIG_FILE"
9192

9293
echo "--- Generating functional test scripts"
9394
npx tsx codegen/functional/index.ts --tests-dir elasticsearch-clients-tests/tests

0 commit comments

Comments
 (0)