2016-12-30 20:52:56 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-08-01 00:51:12 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
2017-12-15 19:34:19 +00:00
|
|
|
|
2019-10-11 15:59:27 +00:00
|
|
|
URL="${CLICKHOUSE_PORT_HTTP_PROTO}://${CLICKHOUSE_HOST}:${CLICKHOUSE_PORT_HTTP}/"
|
|
|
|
|
2020-08-01 00:56:32 +00:00
|
|
|
${CLICKHOUSE_CURL} -vsS "${URL}" --data-binary @- <<< "SELECT 1" 2>&1 | perl -lnE 'print if /Keep-Alive/';
|
|
|
|
${CLICKHOUSE_CURL} -vsS "${URL}" --data-binary @- <<< " error here " 2>&1 | perl -lnE 'print if /Keep-Alive/';
|
|
|
|
${CLICKHOUSE_CURL} -vsS "${URL}"ping 2>&1 | perl -lnE 'print if /Keep-Alive/';
|
2016-12-30 20:52:56 +00:00
|
|
|
|
|
|
|
# no keep-alive:
|
2020-08-01 00:56:32 +00:00
|
|
|
${CLICKHOUSE_CURL} -vsS "${URL}"404/not/found/ 2>&1 | perl -lnE 'print if /Keep-Alive/';
|