From 8ff7a1c6098d774ae57f0e63e38013eeb4b84082 Mon Sep 17 00:00:00 2001 From: FArthur-cmd <613623@mail.ru> Date: Sat, 3 Dec 2022 22:02:37 +0000 Subject: [PATCH] fix tests --- .../0_stateless/02480_tets_show_full.reference | 2 +- .../0_stateless/02480_tets_show_full.sh | 18 ++++++++++++++++++ .../0_stateless/02480_tets_show_full.sql | 7 ------- 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100755 tests/queries/0_stateless/02480_tets_show_full.sh delete mode 100644 tests/queries/0_stateless/02480_tets_show_full.sql diff --git a/tests/queries/0_stateless/02480_tets_show_full.reference b/tests/queries/0_stateless/02480_tets_show_full.reference index d1e64376af7..75a3f5d95fa 100644 --- a/tests/queries/0_stateless/02480_tets_show_full.reference +++ b/tests/queries/0_stateless/02480_tets_show_full.reference @@ -1,2 +1,2 @@ -test_02480_table Memory +test_02480_table MergeTree test_02480_view View diff --git a/tests/queries/0_stateless/02480_tets_show_full.sh b/tests/queries/0_stateless/02480_tets_show_full.sh new file mode 100755 index 00000000000..5f5040ba128 --- /dev/null +++ b/tests/queries/0_stateless/02480_tets_show_full.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + + +database=$($CLICKHOUSE_CLIENT -q 'SELECT currentDatabase()') + +$CLICKHOUSE_CLIENT -nm -q " +DROP TABLE IF EXISTS test_02480_table; +DROP VIEW IF EXISTS test_02480_view; +CREATE TABLE test_02480_table (id Int64) ENGINE=MergeTree ORDER BY id; +CREATE VIEW test_02480_view AS SELECT * FROM test_02480_table; +SHOW FULL TABLES FROM $database LIKE '%'; +DROP TABLE IF EXISTS test_02480_table; +DROP VIEW IF EXISTS test_02480_view; +" diff --git a/tests/queries/0_stateless/02480_tets_show_full.sql b/tests/queries/0_stateless/02480_tets_show_full.sql deleted file mode 100644 index f18efd79f03..00000000000 --- a/tests/queries/0_stateless/02480_tets_show_full.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE IF EXISTS test_02480_table; -DROP VIEW IF EXISTS test_02480_view; -CREATE TABLE test_02480_table (id Int64) ENGINE=Memory(); -CREATE VIEW test_02480_view AS SELECT * FROM test_02480_table; -SHOW FULL TABLES FROM `default` LIKE '%'; -DROP TABLE IF EXISTS test_02480_table; -DROP VIEW IF EXISTS test_02480_view;