mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
30 lines
829 B
Python
30 lines
829 B
Python
from helpers.cluster import ClickHouseCluster
|
|
|
|
|
|
def get_table_path(node, table, database):
|
|
return node.query(
|
|
sql=f"SELECT data_paths FROM system.tables WHERE table = '{table}' and database = '{database}'"
|
|
).strip("'[]\n")
|
|
|
|
|
|
def check_flags_deleted(node, database_name, tables):
|
|
for table in tables:
|
|
assert "convert_to_replicated" not in node.exec_in_container(
|
|
[
|
|
"bash",
|
|
"-c",
|
|
f"ls {get_table_path(node, table, database_name)}",
|
|
]
|
|
)
|
|
|
|
|
|
def set_convert_flags(node, database_name, tables):
|
|
for table in tables:
|
|
node.exec_in_container(
|
|
[
|
|
"bash",
|
|
"-c",
|
|
f"touch {get_table_path(node, table, database_name)}convert_to_replicated",
|
|
]
|
|
)
|