1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fix: stop using openssl for container healthchecks (#4181)

Dragonfly responds to ascii based requests to tls port with:
`-ERR Bad TLS header, double check if you enabled TLS for your client.`

Therefore, it is possible to test now both tls and non-tls ports with a plain-text PING.
Fixes #4171

Also, blacklist the bloom-filter test that Dragonfly does not support yet.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-11-25 17:41:17 +02:00
parent 379557b3ac
commit e4208e99dd
No known key found for this signature in database
GPG key ID: 6568CCAB9736B618
2 changed files with 2 additions and 7 deletions

View file

@ -28,6 +28,7 @@ def test_create_cf(r: redis.Redis):
assert r.topk().reserve("topk", 5, 100, 5, 0.9)
@pytest.mark.unsupported_server_types("dragonfly")
def test_bf_reserve(r: redis.Redis):
assert r.bf().reserve("bloom", 0.01, 1000)
assert r.bf().reserve("bloom_ns", 0.01, 1000, noScale=True)

View file

@ -20,13 +20,7 @@ if [ -z "$HEALTHCHECK_PORT" ]; then
PORT=$(echo $DF_NET | grep -oE ':[0-9]+' | cut -c2- | tail -n 1)
fi
# If we're running with TLS enabled, utilise OpenSSL for the check
if [ -f "/etc/dragonfly/tls/ca.crt" ]
then
_healthcheck="openssl s_client -connect ${HOST}:${PORT} -CAfile /etc/dragonfly/tls/ca.crt -quiet -no_ign_eof"
else
_healthcheck="nc -q1 $HOST $PORT"
fi
_healthcheck="nc -q1 $HOST $PORT"
echo PING | ${_healthcheck}