88
99set -euo pipefail
1010
11- STACK_VERSION=" ${STACK_VERSION:- 9.1 .0} "
11+ STACK_VERSION=" ${STACK_VERSION:- 9.3 .0} "
1212ES_CONTAINER_NAME=" elastic-cli-es-test"
1313NETWORK_NAME=" elastic-cli-test-net"
1414TESTS_REPO=" https://github.com/elastic/elasticsearch-clients-tests.git"
4040
4141echo " --- Building CLI"
4242npm run build
43-
44- echo " --- Linking elastic binary onto PATH"
4543npm link
4644
4745echo " --- 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
8079done
8180echo " 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
8585contexts:
8686 ci:
87- es :
87+ elasticsearch :
8888 url: http://localhost:9200
8989current_context: ci
9090EOF
91+ export ELASTIC_CLI_CONFIG_FILE=" $CI_CONFIG_FILE "
9192
9293echo " --- Generating functional test scripts"
9394npx tsx codegen/functional/index.ts --tests-dir elasticsearch-clients-tests/tests
0 commit comments