2022-11-22 18:44:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
# shellcheck source=../shell_config.sh
|
|
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
|
2022-11-22 18:46:03 +00:00
|
|
|
# The exception message contains instruction on how to reset the password:
|
|
|
|
|
2022-11-22 18:44:59 +00:00
|
|
|
$CLICKHOUSE_CLIENT --password incorrect-password --query "SELECT 1" 2>&1 | grep -o 'password is incorrect'
|
|
|
|
$CLICKHOUSE_CLIENT --password incorrect-password --query "SELECT 1" 2>&1 | grep -o -P 'reset.+password'
|
|
|
|
|
|
|
|
$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" -u default:incorrect-password -d "SELECT 1" | grep -o 'password is incorrect'
|
|
|
|
$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" -u default:incorrect-password -d "SELECT 1" | grep -o -P 'reset.+password'
|