mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Tests: Use new possibly redefined values from env (in 2 tests)
This commit is contained in:
parent
f8548156a0
commit
26c44d5993
@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CLICKHOUSE_URL=${CLICKHOUSE_URL:=http://localhost:8123/}
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
( curl -s --head "${CLICKHOUSE_URL}?query=SELECT%201";
|
||||
curl -s --head "${CLICKHOUSE_URL}?query=select+*+from+system.numbers+limit+1000000" ) | grep -v "Date:"
|
||||
( ${CLICKHOUSE_CURL} -s --head "${CLICKHOUSE_URL}?query=SELECT%201";
|
||||
${CLICKHOUSE_CURL} -s --head "${CLICKHOUSE_URL}?query=select+*+from+system.numbers+limit+1000000" ) | grep -v "Date:"
|
||||
|
||||
if [[ `curl -sS -X POST -I "${CLICKHOUSE_URL}?query=SELECT+1" | grep -c '411 Length Required'` -ne 1 ]]; then
|
||||
if [[ `${CLICKHOUSE_CURL} -sS -X POST -I "${CLICKHOUSE_URL}?query=SELECT+1" | grep -c '411 Length Required'` -ne 1 ]]; then
|
||||
echo FAIL
|
||||
fi
|
||||
|
@ -2,13 +2,15 @@
|
||||
|
||||
# Not default server config needed
|
||||
|
||||
tcp_ssl_port=`clickhouse extract-from-config -c /etc/clickhouse-server/config.xml -k tcp_ssl_port 2>/dev/null`
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
tcp_ssl_port=`${CLICKHOUSE_EXTRACT_CONFIG} -k tcp_ssl_port 2>/dev/null`
|
||||
if [ -z ${tcp_ssl_port} ]; then
|
||||
# Secure port disabled. Fake result
|
||||
echo 1
|
||||
echo 2
|
||||
cat $CURDIR/00505_tcp_ssl.reference
|
||||
else
|
||||
# Auto port detect
|
||||
clickhouse-client --ssl -q "SELECT 1";
|
||||
clickhouse-client --ssl --port=9440 -q "SELECT 2";
|
||||
${CLICKHOUSE_CLIENT} --ssl -q "SELECT 1";
|
||||
${CLICKHOUSE_CLIENT} --ssl --port=9440 -q "SELECT 2";
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user