ClickHouse/tests/integration/test_config_corresponding_root/test.py

23 lines
628 B
Python
Raw Normal View History

2019-07-23 13:40:16 +00:00
import os
import pytest
from helpers.cluster import ClickHouseCluster
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
config_dir = os.path.join(SCRIPT_DIR, './configs')
cluster = ClickHouseCluster(__file__)
node = cluster.add_instance('node', config_dir = config_dir)
caught_exception = ""
@pytest.fixture(scope="module")
def start_cluster():
global caught_exception
try:
cluster.start()
except Exception as e:
2019-07-25 13:41:39 +00:00
caught_exception = str(e)
2019-07-23 13:40:16 +00:00
def test_work(start_cluster):
2019-07-25 13:41:39 +00:00
assert caught_exception.find("Root element doesn't have the corresponding root element as the config file.") != -1