Skip to content

Commit 5d5c0e3

Browse files
committed
Fix local testing on macOS
1 parent b4163f9 commit 5d5c0e3

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

Diff for: .buildkite/functions/imports.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [[ -z $es_node_name ]]; then
4343

4444
fi
4545

46-
export script_path=$(dirname $(realpath -s $0))
46+
export script_path=$(dirname $(realpath $0))
4747
source $script_path/functions/cleanup.sh
4848
source $script_path/functions/wait-for-container.sh
4949
trap "cleanup_trap ${network_name}" EXIT

Diff for: .buildkite/run-elasticsearch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
2222
# - Use https only when TEST_SUITE is "platinum", when "free" use http
2323

24-
script_path=$(dirname $(realpath -s $0))
24+
script_path=$(dirname $(realpath $0))
2525
source $script_path/functions/imports.sh
2626
set -euo pipefail
2727

Diff for: .buildkite/run-repository.sh

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ docker build \
2828
--file .buildkite/Dockerfile \
2929
--tag elastic/elasticsearch-py \
3030
--build-arg "PYTHON_VERSION=${PYTHON_VERSION}" \
31-
--build-arg "BUILDER_UID=$(id -u)" \
32-
--build-arg "BUILDER_GID=$(id -g)" \
3331
.
3432

3533
echo -e "\033[1m>>>>> Run [elastic/elasticsearch-py container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"

Diff for: .buildkite/run-tests

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# - Add `$RUNSCRIPTS` env var for running Elasticsearch dependent products
66

77
# Default environment variables
8-
export STACK_VERSION="${STACK_VERSION:=8.0.0-SNAPSHOT}"
8+
export STACK_VERSION="${STACK_VERSION:=8.16.0-SNAPSHOT}"
99
export TEST_SUITE="${TEST_SUITE:=platinum}"
10-
export PYTHON_VERSION="${PYTHON_VERSION:=3.9}"
10+
export PYTHON_VERSION="${PYTHON_VERSION:=3.12}"
1111
export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=urllib3}"
1212

13-
script_path=$(dirname $(realpath -s $0))
13+
script_path=$(dirname $(realpath $0))
1414
source $script_path/functions/imports.sh
1515
set -euo pipefail
1616

Diff for: test_elasticsearch/utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from typing import Optional, Tuple
2323

2424
from elasticsearch import (
25+
ApiError,
2526
AuthorizationException,
2627
ConnectionError,
2728
Elasticsearch,
@@ -55,7 +56,7 @@ def es_url() -> str:
5556
error = None
5657
for url in urls_to_try:
5758
if url.startswith("https://"):
58-
client = Elasticsearch(url, ca_certs=CA_CERTS, verify_certs=False)
59+
client = Elasticsearch(url, ca_certs=CA_CERTS, verify_certs=True)
5960
else:
6061
client = Elasticsearch(url)
6162
try:
@@ -72,7 +73,7 @@ def es_url() -> str:
7273
except ConnectionError:
7374
time.sleep(0.1)
7475

75-
except ConnectionError as e:
76+
except ConnectionError, ApiError as e:
7677
if error is None:
7778
error = str(e)
7879
else:

0 commit comments

Comments
 (0)