mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
Merge upstream/changelog-26.6 (9593 commits) into our debranded fork. - 190 conflicts resolved: 24 delete-side kept-removed (grpc/arrowflight/gcloud), submodules+version→26.6, contrib/CMakeLists keeps zap + new libpng, drops capnproto (zap provides kj), Server.cpp/CMakeLists re-apply the ZAP wiring + gRPC/arrowflight/gcloud removal. - Full-tree debrand re-swept over the new 26.6 code (uniform Datastore naming; Azure fork Clickhouse* symbols preserved). 0 clickhouse in product src/programs/CMakeLists. - Version now 26.6.1.1. gRPC/google-cloud/chdig stay removed; ZAP remains the transport.
51 lines
1.3 KiB
Python
51 lines
1.3 KiB
Python
# pylint: disable=line-too-long
|
|
# pylint: disable=unused-argument
|
|
# pylint: disable=redefined-outer-name
|
|
|
|
import pytest
|
|
|
|
from helpers.cluster import DatastoreCluster
|
|
|
|
cluster = DatastoreCluster(__file__)
|
|
node = cluster.add_instance("node_default", stay_alive=True)
|
|
|
|
|
|
@pytest.fixture(scope="module", autouse=True)
|
|
def start_cluster():
|
|
try:
|
|
cluster.start()
|
|
yield cluster
|
|
finally:
|
|
cluster.shutdown()
|
|
|
|
|
|
def test_system_logs_comment():
|
|
node.exec_in_container(
|
|
[
|
|
"bash",
|
|
"-c",
|
|
"""echo "
|
|
<datastore>
|
|
<query_log>
|
|
<engine>ENGINE = MergeTree
|
|
PARTITION BY (event_date)
|
|
ORDER BY (event_time)
|
|
TTL event_date + INTERVAL 14 DAY DELETE
|
|
SETTINGS ttl_only_drop_parts=1
|
|
COMMENT 'test_comment'
|
|
</engine>
|
|
<partition_by remove='remove'/>
|
|
</query_log>
|
|
</datastore>
|
|
" > /etc/datastore-server/config.d/yyy-override-query_log.xml
|
|
""",
|
|
]
|
|
)
|
|
node.restart_datastore()
|
|
|
|
node.query("select 1")
|
|
node.query("system flush logs")
|
|
|
|
comment = node.query("SELECT comment FROM system.tables WHERE name = 'query_log'")
|
|
assert comment == "test_comment\n"
|