Fix tests

This commit is contained in:
kssenii 2024-01-17 15:52:07 +01:00
parent 3d564c0802
commit dc5d09fc55
3 changed files with 20 additions and 2 deletions

View File

@ -28,5 +28,5 @@
<role_cache_expiration_time_seconds>2</role_cache_expiration_time_seconds>
</access_control_improvements>
<custom_cached_disks_base_directory remove="remove"/>
<custom_cached_disks_base_directory replace="replace">/</custom_cached_disks_base_directory>
</clickhouse>

View File

@ -0,0 +1,3 @@
<clickhouse>
<custom_cached_disks_base_directory remove="remove"/>
</clickhouse>

View File

@ -27,6 +27,14 @@ def cluster():
"config.d/storage_conf_2.xml",
],
)
cluster.add_instance(
"node_no_filesystem_caches_path",
main_configs=[
"config.d/storage_conf.xml",
"config.d/remove_filesystem_caches_path.xml",
],
stay_alive=True,
)
logging.info("Starting cluster...")
cluster.start()
@ -197,7 +205,7 @@ def test_caches_with_the_same_configuration_2(cluster, node_name):
def test_custom_cached_disk(cluster):
node = cluster.instances["node"]
node = cluster.instances["node_no_filesystem_caches_path"]
assert "Cannot create cached custom disk without" in node.query_and_get_error(
f"""
@ -249,6 +257,13 @@ def test_custom_cached_disk(cluster):
""",
]
)
node.exec_in_container(
[
"bash",
"-c",
"rm /etc/clickhouse-server/config.d/remove_filesystem_caches_path.xml"
]
)
node.restart_clickhouse()
node.query(