2021-05-21 18:56:22 +00:00
|
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
|
|
|
|
|
|
|
|
def test_extra_yaml_mix():
|
|
|
|
# some configs are written in XML, others are written in YAML
|
2022-03-22 16:39:58 +00:00
|
|
|
cluster = ClickHouseCluster(
|
|
|
|
__file__, zookeeper_config_path="configs/config.d/zookeeper.xml"
|
|
|
|
)
|
|
|
|
|
|
|
|
all_confd = [
|
|
|
|
"configs/config.d/0_common_instance_config.yaml",
|
|
|
|
"configs/config.d/access_control.yaml",
|
2024-06-18 08:23:42 +00:00
|
|
|
"configs/config.d/error_log.xml",
|
2022-03-22 16:39:58 +00:00
|
|
|
"configs/config.d/keeper_port.xml",
|
|
|
|
"configs/config.d/logging_no_rotate.xml",
|
|
|
|
"configs/config.d/log_to_console.yaml",
|
|
|
|
"configs/config.d/macros.yaml",
|
2023-02-07 23:46:13 +00:00
|
|
|
"configs/config.d/mark_cache_size.yaml",
|
2022-03-22 16:39:58 +00:00
|
|
|
"configs/config.d/metric_log.xml",
|
|
|
|
"configs/config.d/more_clusters.yaml",
|
|
|
|
"configs/config.d/part_log.xml",
|
|
|
|
"configs/config.d/path.yaml",
|
|
|
|
"configs/config.d/query_masking_rules.xml",
|
|
|
|
"configs/config.d/tcp_with_proxy.yaml",
|
|
|
|
"configs/config.d/test_cluster_with_incorrect_pw.xml",
|
|
|
|
"configs/config.d/text_log.yaml",
|
|
|
|
"configs/config.d/zookeeper.xml",
|
|
|
|
]
|
|
|
|
|
|
|
|
all_userd = [
|
|
|
|
"configs/users.d/allow_introspection_functions.xml",
|
|
|
|
"configs/users.d/log_queries.yaml",
|
|
|
|
]
|
|
|
|
|
|
|
|
node = cluster.add_instance(
|
|
|
|
"node",
|
|
|
|
base_config_dir="configs",
|
|
|
|
main_configs=all_confd,
|
|
|
|
user_configs=all_userd,
|
|
|
|
with_zookeeper=False,
|
|
|
|
users_config_name="users.yaml",
|
|
|
|
copy_common_configs=False,
|
|
|
|
config_root_name="clickhouse",
|
2023-02-07 23:57:14 +00:00
|
|
|
env_variables={"CONFIG_TEST_ENV": "8956"},
|
2022-03-22 16:39:58 +00:00
|
|
|
)
|
2021-05-21 18:56:22 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
cluster.start()
|
2022-03-22 16:39:58 +00:00
|
|
|
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"
|
|
|
|
)
|
2023-02-18 18:45:33 +00:00
|
|
|
assert (
|
|
|
|
node.query(
|
|
|
|
"select value from system.server_settings where name = 'mark_cache_size'"
|
|
|
|
)
|
|
|
|
== "8956\n"
|
|
|
|
)
|
2021-05-21 18:56:22 +00:00
|
|
|
|
|
|
|
finally:
|
|
|
|
cluster.shutdown()
|