From e9f6c398cf6bd1052a3cd194252580736e97c561 Mon Sep 17 00:00:00 2001 From: santrancisco Date: Tue, 21 Nov 2023 22:26:34 +1100 Subject: [PATCH] fixing test --- .../02921_database_filesystem_path_check.reference | 2 -- .../02921_database_filesystem_path_check.sh | 13 ------------- .../02921_database_filesystem_path_check.sql | 2 ++ 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100755 tests/queries/0_stateless/02921_database_filesystem_path_check.sh create mode 100755 tests/queries/0_stateless/02921_database_filesystem_path_check.sql diff --git a/tests/queries/0_stateless/02921_database_filesystem_path_check.reference b/tests/queries/0_stateless/02921_database_filesystem_path_check.reference index 21ebc92b43f..e69de29bb2d 100644 --- a/tests/queries/0_stateless/02921_database_filesystem_path_check.reference +++ b/tests/queries/0_stateless/02921_database_filesystem_path_check.reference @@ -1,2 +0,0 @@ -Path must be inside user-files path -Path must be inside user-files path \ No newline at end of file diff --git a/tests/queries/0_stateless/02921_database_filesystem_path_check.sh b/tests/queries/0_stateless/02921_database_filesystem_path_check.sh deleted file mode 100755 index 8b60acbb47e..00000000000 --- a/tests/queries/0_stateless/02921_database_filesystem_path_check.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# shellcheck source=../shell_config.sh -. "$CUR_DIR"/../shell_config.sh - -function get_exception_message() -{ - $CLICKHOUSE_CLIENT --query "$1" |& grep -o 'Path must be inside user-files path' -} - -get_exception_message "create database db_filesystem ENGINE=Filesystem('/etc');" -get_exception_message "create database db_filesystem ENGINE=Filesystem('../../../../../../../../etc')';" \ No newline at end of file diff --git a/tests/queries/0_stateless/02921_database_filesystem_path_check.sql b/tests/queries/0_stateless/02921_database_filesystem_path_check.sql new file mode 100755 index 00000000000..d62b629df7b --- /dev/null +++ b/tests/queries/0_stateless/02921_database_filesystem_path_check.sql @@ -0,0 +1,2 @@ +create database db_filesystem ENGINE=Filesystem('/etc'); -- { serverError BAD_ARGUMENTS } +create database db_filesystem ENGINE=Filesystem('../../../../../../../../etc'); -- { serverError BAD_ARGUMENTS } \ No newline at end of file