test added

This commit is contained in:
Yakov Olkhovskiy 2022-08-04 01:41:13 -04:00
parent 1680be19ca
commit 33b0b1828a
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Tags: no-parallel
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} -q "DROP USER IF EXISTS u_02377"
${CLICKHOUSE_CLIENT} -q "drop quota if exists q_02377"
${CLICKHOUSE_CLIENT} -q "CREATE USER u_02377 IDENTIFIED WITH plaintext_password BY 'password';"
${CLICKHOUSE_CLIENT} -q "CREATE QUOTA q_02377 KEYED BY client_key FOR INTERVAL 1 month MAX queries = 100 TO u_02377;"
${CLICKHOUSE_CLIENT} --user=u_02377 --password=password --quota_key=q_02377 --query="select 1"
${CLICKHOUSE_CLIENT} -q "DROP USER IF EXISTS u_02377"
${CLICKHOUSE_CLIENT} -q "drop quota if exists q_02377"