mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
aa25ce9e3d
Cf. PR #50986 - rename XML attribute "encryption_codec" to "encrypted_by"
38 lines
961 B
Python
38 lines
961 B
Python
import pytest
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
|
|
def start_clickhouse(config, err_msg):
|
|
cluster = ClickHouseCluster(__file__)
|
|
node = cluster.add_instance("node", main_configs=[config])
|
|
caught_exception = ""
|
|
try:
|
|
cluster.start()
|
|
except Exception as e:
|
|
caught_exception = str(e)
|
|
assert err_msg in caught_exception
|
|
|
|
|
|
def test_wrong_method():
|
|
start_clickhouse(
|
|
"configs/config_wrong_method.xml", "Unknown encryption method. Got WRONG"
|
|
)
|
|
|
|
|
|
def test_invalid_chars():
|
|
start_clickhouse(
|
|
"configs/config_invalid_chars.xml",
|
|
"Cannot read encrypted text, check for valid characters",
|
|
)
|
|
|
|
|
|
def test_no_encryption_key():
|
|
start_clickhouse(
|
|
"configs/config_no_encryption_key.xml",
|
|
"There is no key 0 in config for AES_128_GCM_SIV encryption codec",
|
|
)
|
|
|
|
|
|
def test_subnodes():
|
|
start_clickhouse("configs/config_subnodes.xml", "cannot contain nested elements")
|