mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Add test for hiding secrets in table functions in the output of EXPLAIN QUERY TREE.
This commit is contained in:
parent
a461d20af9
commit
e3518e54b8
@ -496,6 +496,17 @@ def test_table_functions():
|
|||||||
if not error:
|
if not error:
|
||||||
node.query(f"DROP TABLE {table_name}")
|
node.query(f"DROP TABLE {table_name}")
|
||||||
|
|
||||||
|
# Check EXPLAIN QUERY TREE
|
||||||
|
for toggle, secret in enumerate(["[HIDDEN]", password]):
|
||||||
|
skip = ['mysql', 'postgresql']
|
||||||
|
for table_function in table_functions:
|
||||||
|
should_skip = any([table_function.startswith(prefix_to_skip) for prefix_to_skip in skip])
|
||||||
|
if not should_skip:
|
||||||
|
output = node.query(f"EXPLAIN QUERY TREE SELECT * FROM {table_function} {show_secrets}={toggle}")
|
||||||
|
assert secret in output
|
||||||
|
if not toggle:
|
||||||
|
assert password not in output
|
||||||
|
|
||||||
|
|
||||||
def test_table_function_ways_to_call():
|
def test_table_function_ways_to_call():
|
||||||
password = new_password()
|
password = new_password()
|
||||||
|
Loading…
Reference in New Issue
Block a user