2022-01-25 13:40:12 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
|
|
|
|
cluster = ClickHouseCluster(__file__)
|
|
|
|
|
2022-03-22 16:39:58 +00:00
|
|
|
node1 = cluster.add_instance(
|
|
|
|
"node1", main_configs=["configs/keeper.xml"], stay_alive=True
|
|
|
|
)
|
2022-01-25 13:40:12 +00:00
|
|
|
|
|
|
|
# test that server is able to start
|
|
|
|
@pytest.fixture(scope="module")
|
|
|
|
def started_cluster():
|
|
|
|
try:
|
|
|
|
cluster.start()
|
2022-09-06 10:58:14 +00:00
|
|
|
|
2022-01-25 13:40:12 +00:00
|
|
|
yield cluster
|
|
|
|
finally:
|
|
|
|
cluster.shutdown()
|
|
|
|
|
2022-03-22 16:39:58 +00:00
|
|
|
|
2022-01-25 13:40:12 +00:00
|
|
|
def test_create_replicated(started_cluster):
|
|
|
|
assert node1.query("SELECT 1") == "1\n"
|