2021-05-21 18:56:22 +00:00
|
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
|
|
|
|
|
|
|
|
def test_xml_main_conf():
|
|
|
|
# main configs are in XML; config.d and users.d are in YAML
|
|
|
|
cluster = ClickHouseCluster(
|
|
|
|
__file__, zookeeper_config_path="configs/config.d/zookeeper.yaml"
|
|
|
|
)
|
2022-03-22 16:39:58 +00:00
|
|
|
|
2021-05-21 18:56:22 +00:00
|
|
|
all_confd = [
|
|
|
|
"configs/config.d/access_control.yaml",
|
2024-06-18 08:23:42 +00:00
|
|
|
"configs/config.d/error_log.yaml",
|
2021-05-21 18:56:22 +00:00
|
|
|
"configs/config.d/keeper_port.yaml",
|
|
|
|
"configs/config.d/logging_no_rotate.yaml",
|
|
|
|
"configs/config.d/log_to_console.yaml",
|
|
|
|
"configs/config.d/macros.yaml",
|
|
|
|
"configs/config.d/metric_log.yaml",
|
|
|
|
"configs/config.d/more_clusters.yaml",
|
|
|
|
"configs/config.d/part_log.yaml",
|
|
|
|
"configs/config.d/path.yaml",
|
|
|
|
"configs/config.d/query_masking_rules.yaml",
|
2024-07-19 13:58:50 +00:00
|
|
|
"configs/config.d/query_metric_log.yaml",
|
2021-05-21 18:56:22 +00:00
|
|
|
"configs/config.d/tcp_with_proxy.yaml",
|
|
|
|
"configs/config.d/test_cluster_with_incorrect_pw.yaml",
|
|
|
|
"configs/config.d/text_log.yaml",
|
|
|
|
"configs/config.d/zookeeper.yaml",
|
|
|
|
]
|
2022-03-22 16:39:58 +00:00
|
|
|
|
2021-05-21 18:56:22 +00:00
|
|
|
all_userd = [
|
|
|
|
"configs/users.d/allow_introspection_functions.yaml",
|
|
|
|
"configs/users.d/log_queries.yaml",
|
|
|
|
]
|
2022-03-22 16:39:58 +00:00
|
|
|
|
2021-09-23 08:08:40 +00:00
|
|
|
node = cluster.add_instance(
|
|
|
|
"node",
|
|
|
|
base_config_dir="configs",
|
|
|
|
main_configs=all_confd,
|
|
|
|
user_configs=all_userd,
|
|
|
|
with_zookeeper=False,
|
|
|
|
config_root_name="clickhouse",
|
|
|
|
)
|
2021-05-21 18:56:22 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
cluster.start()
|
|
|
|
assert (
|
|
|
|
node.query(
|
|
|
|
"select value from system.settings where name = 'max_memory_usage'"
|
|
|
|
)
|
|
|
|
== "10000000000\n"
|
|
|
|
)
|
|
|
|
assert (
|
|
|
|
node.query(
|
|
|
|
"select value from system.settings where name = 'max_block_size'"
|
|
|
|
)
|
|
|
|
== "64999\n"
|
|
|
|
)
|
|
|
|
|
|
|
|
finally:
|
|
|
|
cluster.shutdown()
|