ClickHouse/tests/queries/0_stateless/02344_describe_cache.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
634 B
Bash
Raw Normal View History

2023-09-25 21:35:21 +00:00
#!/usr/bin/env bash
# Tags: no-fasttest
2023-09-26 09:57:46 +00:00
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
2023-09-25 21:35:21 +00:00
disk_name="02344_describe_cache_test"
$CLICKHOUSE_CLIENT -nm --query """
DROP TABLE IF EXISTS test;
CREATE TABLE test (a Int32, b String)
ENGINE = MergeTree() ORDER BY tuple()
2023-09-27 09:22:44 +00:00
SETTINGS disk = disk(name = '$disk_name', type = cache, max_size = '100Ki', path = '$disk_name', disk = 's3_disk');
2023-09-25 21:35:21 +00:00
"""
$CLICKHOUSE_CLIENT -nm --query """
SELECT count() FROM system.disks WHERE name = '$disk_name'
"""
$CLICKHOUSE_CLIENT --query "DESCRIBE FILESYSTEM CACHE '${disk_name}'"