ClickHouse/tests/queries/0_stateless/02311_system_zookeeper_insert_priv.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
574 B
Bash
Raw Normal View History

2022-05-31 03:16:06 +00:00
#!/usr/bin/env bash
# Tags: no-parallel
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
${CLICKHOUSE_CLIENT_BINARY} --query "drop user if exists u_02311"
${CLICKHOUSE_CLIENT_BINARY} --query "create user u_02311"
error="$(${CLICKHOUSE_CLIENT_BINARY} --user=u_02311 --query "insert into system.zookeeper (path, name, value) values ('//3-insert-testc/c/c/kk', 'kk', '11')" 2>&1 > /dev/null)"
echo "${error}" | grep -Fc "ACCESS_DENIED"
${CLICKHOUSE_CLIENT_BINARY} --query "drop user u_02311"