2019-11-09 12:16:34 +00:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
|
|
|
|
cluster = ClickHouseCluster(__file__)
|
|
|
|
|
2022-03-22 16:39:58 +00:00
|
|
|
node1 = cluster.add_instance("node1", with_zookeeper=True)
|
|
|
|
node2 = cluster.add_instance(
|
|
|
|
"node2",
|
|
|
|
with_zookeeper=True,
|
2024-02-08 14:18:17 +00:00
|
|
|
image="clickhouse/clickhouse-server",
|
2024-02-09 11:48:07 +00:00
|
|
|
tag="23.3",
|
2022-03-22 16:39:58 +00:00
|
|
|
with_installed_binary=True,
|
|
|
|
)
|
2020-09-16 04:26:10 +00:00
|
|
|
|
2019-11-09 12:16:34 +00:00
|
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
|
|
def start_cluster():
|
|
|
|
try:
|
|
|
|
cluster.start()
|
|
|
|
|
|
|
|
yield cluster
|
|
|
|
finally:
|
|
|
|
cluster.shutdown()
|
|
|
|
|
|
|
|
|
2020-09-16 04:26:10 +00:00
|
|
|
def test_different_versions(start_cluster):
|
2022-03-22 16:39:58 +00:00
|
|
|
assert (
|
|
|
|
node1.query(
|
|
|
|
"SELECT uniqExact(x) FROM (SELECT version() as x from remote('node{1,2}', system.one))"
|
|
|
|
)
|
|
|
|
== "2\n"
|
|
|
|
)
|