mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Analyzer: Fix test_wrong_db_or_table_name/test.py::test_wrong_table_name
This commit is contained in:
parent
8c765a3713
commit
6aad9b1f13
@ -17,6 +17,5 @@ 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
|
||||
test_user_defined_object_persistence/test.py::test_persistence
|
||||
test_wrong_db_or_table_name/test.py::test_wrong_table_name
|
||||
test_zookeeper_config/test.py::test_chroot_with_same_root
|
||||
test_zookeeper_config/test.py::test_chroot_with_different_root
|
||||
|
@ -92,26 +92,31 @@ def test_wrong_table_name(start):
|
||||
INSERT INTO test.table_test SELECT 1;
|
||||
"""
|
||||
)
|
||||
with pytest.raises(
|
||||
QueryRuntimeException,
|
||||
match="DB::Exception: Table test.table_test1 does not exist. Maybe you meant test.table_test?.",
|
||||
):
|
||||
node.query(
|
||||
"""
|
||||
|
||||
error_message = node.query_and_get_error(
|
||||
"""
|
||||
SELECT * FROM test.table_test1 LIMIT 1;
|
||||
"""
|
||||
)
|
||||
)
|
||||
assert (
|
||||
"DB::Exception: Table test.table_test1 does not exist. Maybe you meant test.table_test?"
|
||||
in error_message
|
||||
or "DB::Exception: Unknown table expression identifier 'test.table_test1' in scope SELECT * FROM test.table_test1 LIMIT 1."
|
||||
in error_message
|
||||
)
|
||||
assert int(node.query("SELECT count() FROM test.table_test;")) == 1
|
||||
|
||||
with pytest.raises(
|
||||
QueryRuntimeException,
|
||||
match="DB::Exception: Table test2.table_test1 does not exist. Maybe you meant test.table_test?.",
|
||||
):
|
||||
node.query(
|
||||
"""
|
||||
error_message = node.query_and_get_error(
|
||||
"""
|
||||
SELECT * FROM test2.table_test1 LIMIT 1;
|
||||
"""
|
||||
)
|
||||
)
|
||||
assert (
|
||||
"DB::Exception: Table test2.table_test1 does not exist. Maybe you meant test.table_test?."
|
||||
in error_message
|
||||
or "DB::Exception: Unknown table expression identifier 'test2.table_test1' in scope SELECT * FROM test2.table_test1 LIMIT 1."
|
||||
in error_message
|
||||
)
|
||||
|
||||
node.query(
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user