mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #57146 from vitlibar/fix-test_replicated_merge_tree_encryption_codec_different_keys_2
Fix test test_replicated_merge_tree_encryption_codec/test.py::test_different_keys
This commit is contained in:
commit
4fed61e8ca
@ -91,9 +91,14 @@ def test_different_keys():
|
||||
copy_keys(node2, "key_b")
|
||||
create_table()
|
||||
|
||||
insert_data()
|
||||
# Insert two blocks without duplicated blocks to force each replica to actually fetch parts from another replica.
|
||||
node1.query("INSERT INTO tbl VALUES (1, 'str1')")
|
||||
node2.query("INSERT INTO tbl VALUES (2, 'str2')")
|
||||
node1.query("SYSTEM SYNC REPLICA ON CLUSTER 'cluster' tbl")
|
||||
|
||||
# After "SYSTEM SYNC REPLICA" we expect node1 and node2 here both having a part for (1, 'str1') encrypted with "key_a",
|
||||
# and a part for (2, 'str2') encrypted with "key_b".
|
||||
# So the command "SELECT * from tbl" must fail on both nodes because each node has only one encryption key.
|
||||
assert "BAD_DECRYPT" in node1.query_and_get_error("SELECT * FROM tbl")
|
||||
assert "BAD_DECRYPT" in node2.query_and_get_error("SELECT * FROM tbl")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user