ClickHouse/dbms/tests/queries/0_stateless/00501_http_head.sh

11 lines
368 B
Bash
Executable File

#!/usr/bin/env bash
CLICKHOUSE_URL=${CLICKHOUSE_URL:=http://localhost:8123/}
( curl -s --head "${CLICKHOUSE_URL}?query=SELECT%201";
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
echo FAIL
fi