mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Analyzer: Fix test_settings_profile
This commit is contained in:
parent
a7c2d3146c
commit
a7c7a5a671
@ -9,7 +9,6 @@ test_merge_table_over_distributed/test.py::test_select_table_name_from_merge_ove
|
||||
test_mutations_with_merge_tree/test.py::test_mutations_with_merge_background_task
|
||||
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_shard_level_const_function/test.py::test_remote
|
||||
test_sql_user_defined_functions_on_cluster/test.py::test_sql_user_defined_functions_on_cluster
|
||||
test_storage_rabbitmq/test.py::test_rabbitmq_materialized_view
|
||||
|
@ -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