mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Separate cases with ssl from test ultiple_hosts_command_line_set
This commit is contained in:
parent
2e3989378c
commit
bb1da0cba5
@ -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
|
||||||
|
@ -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}
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
1
|
||||||
|
1
|
||||||
|
=== Values form config
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
=== Values form config 2
|
||||||
|
1
|
||||||
|
1
|
49
tests/queries/0_stateless/02100_multiple_hosts_command_line_set_ssl.sh
Executable file
49
tests/queries/0_stateless/02100_multiple_hosts_command_line_set_ssl.sh
Executable 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}
|
Loading…
Reference in New Issue
Block a user