From ef57b759e0b1588be3355ad3dd4f7dc3f5fd75c3 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Sun, 19 Dec 2021 12:29:04 +0100 Subject: [PATCH] Add stateless tests for setting hints --- .../02151_invalid_setting_with_hints_in_query.reference | 1 + .../02151_invalid_setting_with_hints_in_query.sh | 7 +++++++ ...52_invalid_setting_with_hints_in_http_request.reference | 1 + .../02152_invalid_setting_with_hints_in_http_request.sh | 7 +++++++ 4 files changed, 16 insertions(+) create mode 100644 tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.reference create mode 100755 tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.sh create mode 100644 tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.reference create mode 100755 tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.sh diff --git a/tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.reference b/tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.reference new file mode 100644 index 00000000000..d86bac9de59 --- /dev/null +++ b/tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.reference @@ -0,0 +1 @@ +OK diff --git a/tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.sh b/tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.sh new file mode 100755 index 00000000000..a3a8eed60b3 --- /dev/null +++ b/tests/queries/0_stateless/02151_invalid_setting_with_hints_in_query.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +$CLICKHOUSE_LOCAL --query="SET input_format_with_names_use_headers = 1" 2>&1 | grep -q "Code: 115. DB::Exception: Unknown setting input_format_with_names_use_headers: Maybe you meant \['input_format_with_names_use_header','input_format_with_types_use_header'\]. (UNKNOWN_SETTING)" && echo 'OK' || echo 'FAIL' ||: diff --git a/tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.reference b/tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.reference new file mode 100644 index 00000000000..d86bac9de59 --- /dev/null +++ b/tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.reference @@ -0,0 +1 @@ +OK diff --git a/tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.sh b/tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.sh new file mode 100755 index 00000000000..21498e4c614 --- /dev/null +++ b/tests/queries/0_stateless/02152_invalid_setting_with_hints_in_http_request.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&?input_format_with_names_use_headers=1" -d 'SELECT 1' 2>&1 | grep -q "Code: 115. DB::Exception: Unknown setting ?input_format_with_names_use_headers: Maybe you meant \['input_format_with_names_use_header','input_format_with_types_use_header'\]. (UNKNOWN_SETTING)" && echo 'OK' || echo 'FAIL' ||: