Separate cases with ssl from test ultiple_hosts_command_line_set

This commit is contained in:
vdimir 2022-03-12 22:37:41 +00:00
parent 2e3989378c
commit bb1da0cba5
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
4 changed files with 59 additions and 24 deletions

View File

@ -15,8 +15,6 @@
1 1
1 1
1 1
1
1
=== Code 210 with ipv6 === Code 210 with ipv6
1 1
1 1
@ -29,16 +27,10 @@
1 1
1 1
1 1
1
1
1
1
=== Values form config 2 === Values form config 2
1 1
1 1
1 1
1
1
=== ===
1 1
1 1

View File

@ -36,10 +36,6 @@ error="$(${CLICKHOUSE_CLIENT} --host "${not_alive_host}" --query "SELECT 1" 2>&1
echo "${error}" | grep -Fc "DB::NetException" echo "${error}" | grep -Fc "DB::NetException"
echo "${error}" | grep -Fc "${not_alive_host}:9000" echo "${error}" | grep -Fc "${not_alive_host}:9000"
error="$(${CLICKHOUSE_CLIENT} --secure --host "${not_alive_host}" --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fq "DB::NetException" && echo 1 || (echo ${error} | head -1)
echo "${error}" | grep -Fq "${not_alive_host}:9440" && echo 1 || (echo ${error} | head -1)
${CLICKHOUSE_CLIENT} --host "${CLICKHOUSE_HOST}" --port "${not_alive_port}" --host "${CLICKHOUSE_HOST}" --query "SELECT 1"; ${CLICKHOUSE_CLIENT} --host "${CLICKHOUSE_HOST}" --port "${not_alive_port}" --host "${CLICKHOUSE_HOST}" --query "SELECT 1";
${CLICKHOUSE_CLIENT} --host "${CLICKHOUSE_HOST}" --port "${CLICKHOUSE_PORT_TCP}" --port "${not_alive_port}" --query "SELECT 1"; ${CLICKHOUSE_CLIENT} --host "${CLICKHOUSE_HOST}" --port "${CLICKHOUSE_PORT_TCP}" --port "${not_alive_port}" --query "SELECT 1";
@ -76,18 +72,10 @@ error="$(${CLICKHOUSE_CLIENT} --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1
echo "${error}" | grep -Fc "DB::NetException" echo "${error}" | grep -Fc "DB::NetException"
echo "${error}" | grep -Fc "${not_alive_host}:${not_alive_port}" echo "${error}" | grep -Fc "${not_alive_host}:${not_alive_port}"
error="$(${CLICKHOUSE_CLIENT} --secure --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fq "DB::NetException" && echo 1 || (echo ${error} | head -1)
echo "${error}" | grep -Fq "${not_alive_host}:${not_alive_port}" && echo 1 || (echo ${error} | head -1)
error="$(${CLICKHOUSE_CLIENT} --host localhost --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)" error="$(${CLICKHOUSE_CLIENT} --host localhost --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fc "DB::NetException" echo "${error}" | grep -Fc "DB::NetException"
echo "${error}" | grep -Fc "localhost:${not_alive_port}" echo "${error}" | grep -Fc "localhost:${not_alive_port}"
error="$(${CLICKHOUSE_CLIENT} --secure --host localhost --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fc "DB::NetException"
echo "${error}" | grep -Fc "localhost:${not_alive_port}"
rm -f ${CUSTOM_CONFIG} rm -f ${CUSTOM_CONFIG}
echo '=== Values form config 2' echo '=== Values form config 2'
@ -102,10 +90,6 @@ error="$(${CLICKHOUSE_CLIENT} --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1
echo "${error}" | grep -Fc "DB::NetException" echo "${error}" | grep -Fc "DB::NetException"
echo "${error}" | grep -Fc "${not_alive_host}:9000" echo "${error}" | grep -Fc "${not_alive_host}:9000"
error="$(${CLICKHOUSE_CLIENT} --secure --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fq "DB::NetException" && echo 1 || (echo ${error} | head -1)
echo "${error}" | grep -Fq "${not_alive_host}:9440" && echo 1 || (echo ${error} | head -1)
${CLICKHOUSE_CLIENT} --host "${CLICKHOUSE_HOST}" --config ${CUSTOM_CONFIG} --query "SELECT 1" ${CLICKHOUSE_CLIENT} --host "${CLICKHOUSE_HOST}" --config ${CUSTOM_CONFIG} --query "SELECT 1"
rm -f ${CUSTOM_CONFIG} rm -f ${CUSTOM_CONFIG}

View File

@ -0,0 +1,10 @@
1
1
=== Values form config
1
1
1
1
=== Values form config 2
1
1

View File

@ -0,0 +1,49 @@
#!/usr/bin/env bash
# Tags: use-ssl
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
not_alive_host="10.100.0.0"
not_alive_port="1"
error="$(${CLICKHOUSE_CLIENT} --secure --host "${not_alive_host}" --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fq "DB::NetException" && echo 1 || (echo ${error} | head -1)
echo "${error}" | grep -Fq "${not_alive_host}:9440" && echo 1 || (echo ${error} | head -1)
echo '=== Values form config'
CUSTOM_CONFIG="$CURDIR/02100_config_2.xml"
rm -f ${CUSTOM_CONFIG}
cat << EOF > ${CUSTOM_CONFIG}
<config>
<host>${not_alive_host}</host>
<port>${not_alive_port}</port>
</config>
EOF
error="$(${CLICKHOUSE_CLIENT} --secure --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fq "DB::NetException" && echo 1 || (echo ${error} | head -1)
echo "${error}" | grep -Fq "${not_alive_host}:${not_alive_port}" && echo 1 || (echo ${error} | head -1)
error="$(${CLICKHOUSE_CLIENT} --secure --host localhost --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fc "DB::NetException"
echo "${error}" | grep -Fc "localhost:${not_alive_port}"
rm -f ${CUSTOM_CONFIG}
echo '=== Values form config 2'
cat << EOF > ${CUSTOM_CONFIG}
<config>
<host>${not_alive_host}</host>
</config>
EOF
error="$(${CLICKHOUSE_CLIENT} --secure --config ${CUSTOM_CONFIG} --query "SELECT 1" 2>&1 > /dev/null)"
echo "${error}" | grep -Fq "DB::NetException" && echo 1 || (echo ${error} | head -1)
echo "${error}" | grep -Fq "${not_alive_host}:9440" && echo 1 || (echo ${error} | head -1)
rm -f ${CUSTOM_CONFIG}