Tests: Use new possibly redefined values from env (in 2 tests)

This commit is contained in:
proller 2017-10-12 22:54:56 +03:00
parent f8548156a0
commit 26c44d5993
2 changed files with 12 additions and 9 deletions

View File

@ -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

View File

@ -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