2022-08-05 13:39:20 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-08-05 14:55:31 +00:00
|
|
|
# Tags: no-fasttest, no-parallel
|
2022-08-05 13:39:20 +00:00
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
# shellcheck source=../shell_config.sh
|
|
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
|
|
|
|
curl -sS "${CLICKHOUSE_URL}" --data "DROP USER IF EXISTS u_02377"
|
|
|
|
curl -sS "${CLICKHOUSE_URL}" --data "drop quota if exists q_02377"
|
|
|
|
curl -sS "${CLICKHOUSE_URL}" --data "CREATE USER u_02377 IDENTIFIED WITH plaintext_password BY 'password'"
|
|
|
|
curl -sS "${CLICKHOUSE_URL}" --data "CREATE QUOTA q_02377 KEYED BY client_key FOR INTERVAL 1 month MAX queries = 100 TO u_02377"
|
|
|
|
|
2022-08-08 13:07:38 +00:00
|
|
|
curl -sS -G "${CLICKHOUSE_URL}&user=u_02377&password=password"a_key=q_02377&query=SELECT%201"
|
2022-08-05 13:39:20 +00:00
|
|
|
|
|
|
|
curl -sS "${CLICKHOUSE_URL}" --data "DROP USER IF EXISTS u_02377"
|
|
|
|
curl -sS "${CLICKHOUSE_URL}" --data "drop quota if exists q_02377"
|