mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +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:
|
||||
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():
|
||||
password = new_password()
|
||||
|
Loading…
Reference in New Issue
Block a user