mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #59975 from ClickHouse/analyzer-fix-test_settings_profile
Analyzer: Fix test_settings_profile
This commit is contained in:
commit
cc59e06fea
@ -8,5 +8,4 @@ test_merge_table_over_distributed/test.py::test_global_in
|
||||
test_merge_table_over_distributed/test.py::test_select_table_name_from_merge_over_distributed
|
||||
test_passing_max_partitions_to_read_remotely/test.py::test_default_database_on_cluster
|
||||
test_select_access_rights/test_main.py::test_alias_columns
|
||||
test_settings_profile/test.py::test_show_profiles
|
||||
test_sql_user_defined_functions_on_cluster/test.py::test_sql_user_defined_functions_on_cluster
|
||||
|
@ -454,22 +454,41 @@ def test_show_profiles():
|
||||
assert instance.query("SHOW PROFILES") == "default\nreadonly\nxyz\n"
|
||||
|
||||
assert instance.query("SHOW CREATE PROFILE xyz") == "CREATE SETTINGS PROFILE xyz\n"
|
||||
|
||||
query_possible_response = [
|
||||
"CREATE SETTINGS PROFILE default\n",
|
||||
"CREATE SETTINGS PROFILE default SETTINGS allow_experimental_analyzer = true\n",
|
||||
]
|
||||
assert (
|
||||
instance.query("SHOW CREATE SETTINGS PROFILE default")
|
||||
== "CREATE SETTINGS PROFILE default\n"
|
||||
in query_possible_response
|
||||
)
|
||||
assert (
|
||||
instance.query("SHOW CREATE PROFILES") == "CREATE SETTINGS PROFILE default\n"
|
||||
|
||||
query_possible_response = [
|
||||
"CREATE SETTINGS PROFILE default\n"
|
||||
"CREATE SETTINGS PROFILE readonly SETTINGS readonly = 1\n"
|
||||
"CREATE SETTINGS PROFILE xyz\n"
|
||||
)
|
||||
"CREATE SETTINGS PROFILE xyz\n",
|
||||
"CREATE SETTINGS PROFILE default SETTINGS allow_experimental_analyzer = true\n"
|
||||
"CREATE SETTINGS PROFILE readonly SETTINGS readonly = 1\n"
|
||||
"CREATE SETTINGS PROFILE xyz\n",
|
||||
]
|
||||
assert instance.query("SHOW CREATE PROFILES") in query_possible_response
|
||||
|
||||
expected_access = (
|
||||
"CREATE SETTINGS PROFILE default\n"
|
||||
"CREATE SETTINGS PROFILE readonly SETTINGS readonly = 1\n"
|
||||
"CREATE SETTINGS PROFILE xyz\n"
|
||||
)
|
||||
assert expected_access in instance.query("SHOW ACCESS")
|
||||
expected_access_analyzer = (
|
||||
"CREATE SETTINGS PROFILE default SETTINGS allow_experimental_analyzer = true\n"
|
||||
"CREATE SETTINGS PROFILE readonly SETTINGS readonly = 1\n"
|
||||
"CREATE SETTINGS PROFILE xyz\n"
|
||||
)
|
||||
|
||||
query_response = instance.query("SHOW ACCESS")
|
||||
assert (
|
||||
expected_access in query_response or expected_access_analyzer in query_response
|
||||
)
|
||||
|
||||
|
||||
def test_set_profile():
|
||||
|
Loading…
Reference in New Issue
Block a user