From 2491d59938cc264972082a389caea87452e4179c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 15 Apr 2020 05:03:54 +0300 Subject: [PATCH] Added a test --- tests/queries/0_stateless/01198_client_quota_key.reference | 2 ++ tests/queries/0_stateless/01198_client_quota_key.sh | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 tests/queries/0_stateless/01198_client_quota_key.reference create mode 100755 tests/queries/0_stateless/01198_client_quota_key.sh diff --git a/tests/queries/0_stateless/01198_client_quota_key.reference b/tests/queries/0_stateless/01198_client_quota_key.reference new file mode 100644 index 00000000000..c25611c15c6 --- /dev/null +++ b/tests/queries/0_stateless/01198_client_quota_key.reference @@ -0,0 +1,2 @@ +1 +Hello diff --git a/tests/queries/0_stateless/01198_client_quota_key.sh b/tests/queries/0_stateless/01198_client_quota_key.sh new file mode 100755 index 00000000000..f4b66aea6ac --- /dev/null +++ b/tests/queries/0_stateless/01198_client_quota_key.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. $CURDIR/../shell_config.sh + +$CLICKHOUSE_CLIENT --quota_key Hello --query_id test_quota_key --log_queries 1 --multiquery --query "SELECT 1; SYSTEM FLUSH LOGS; SELECT DISTINCT quota_key FROM system.query_log WHERE event_date >= yesterday() AND event_time >= now() - 300 AND query_id = 'test_quota_key'"