2017-09-05 18:53:28 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-10-12 19:54:56 +00:00
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-08-01 00:51:12 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
2017-09-23 23:32:26 +00:00
|
|
|
|
2019-10-11 15:59:27 +00:00
|
|
|
( ${CLICKHOUSE_CURL} -s --head "${CLICKHOUSE_URL}&query=SELECT%201";
|
2020-03-03 15:32:41 +00:00
|
|
|
${CLICKHOUSE_CURL} -s --head "${CLICKHOUSE_URL}&query=select+*+from+system.numbers+limit+1000000" ) | grep -v "Date:" | grep -v "X-ClickHouse-Server-Display-Name:" | grep -v "X-ClickHouse-Query-Id:" | grep -v "X-ClickHouse-Format:" | grep -v "X-ClickHouse-Timezone:"
|
2017-10-03 18:31:32 +00:00
|
|
|
|
2020-08-01 01:20:22 +00:00
|
|
|
if [[ $(${CLICKHOUSE_CURL} -sS -X POST -I "${CLICKHOUSE_URL}&query=SELECT+1" | grep -c '411 Length Required') -ne 1 ]]; then
|
2017-09-25 19:45:15 +00:00
|
|
|
echo FAIL
|
|
|
|
fi
|