mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Merge pull request #15850 from ClickHouse/disable_rbac_tests_with_tsan
Disable some RBAC tests with thread sanitizer
This commit is contained in:
commit
38c7132c0f
@ -31,6 +31,10 @@ def cleanup_after_test():
|
||||
|
||||
|
||||
def test_smoke():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
assert "Not enough privileges" in instance.query_and_get_error("SELECT * FROM test.table", user='A')
|
||||
|
||||
@ -42,6 +46,10 @@ def test_smoke():
|
||||
|
||||
|
||||
def test_grant_option():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query("CREATE USER B")
|
||||
|
||||
@ -57,6 +65,10 @@ def test_grant_option():
|
||||
|
||||
|
||||
def test_revoke_requires_grant_option():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query("CREATE USER B")
|
||||
|
||||
@ -107,6 +119,10 @@ def test_revoke_requires_grant_option():
|
||||
|
||||
|
||||
def test_grant_all_on_table():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A, B")
|
||||
instance.query("GRANT ALL ON test.table TO A WITH GRANT OPTION")
|
||||
instance.query("GRANT ALL ON test.table TO B", user='A')
|
||||
@ -117,6 +133,10 @@ def test_grant_all_on_table():
|
||||
|
||||
|
||||
def test_implicit_show_grants():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
assert instance.query("select count() FROM system.databases WHERE name='test'", user="A") == "0\n"
|
||||
assert instance.query("select count() FROM system.tables WHERE database='test' AND name='table'", user="A") == "0\n"
|
||||
@ -159,6 +179,10 @@ def test_implicit_show_grants():
|
||||
|
||||
|
||||
def test_implicit_create_view_grant():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
expected_error = "Not enough privileges"
|
||||
assert expected_error in instance.query_and_get_error("CREATE VIEW test.view_1 AS SELECT 1", user="A")
|
||||
@ -173,6 +197,10 @@ def test_implicit_create_view_grant():
|
||||
|
||||
|
||||
def test_implicit_create_temporary_table_grant():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
expected_error = "Not enough privileges"
|
||||
assert expected_error in instance.query_and_get_error("CREATE TEMPORARY TABLE tmp(name String)", user="A")
|
||||
@ -185,6 +213,10 @@ def test_implicit_create_temporary_table_grant():
|
||||
|
||||
|
||||
def test_introspection():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query("CREATE USER B")
|
||||
instance.query('GRANT SELECT ON test.table TO A')
|
||||
@ -231,6 +263,10 @@ def test_introspection():
|
||||
|
||||
|
||||
def test_current_database():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query("GRANT SELECT ON table TO A", database="test")
|
||||
|
||||
|
@ -30,6 +30,10 @@ def cleanup_after_test():
|
||||
|
||||
|
||||
def test_create_role():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query('CREATE ROLE R1')
|
||||
|
||||
@ -46,6 +50,10 @@ def test_create_role():
|
||||
|
||||
|
||||
def test_grant_role_to_role():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query('CREATE ROLE R1')
|
||||
instance.query('CREATE ROLE R2')
|
||||
@ -63,6 +71,10 @@ def test_grant_role_to_role():
|
||||
|
||||
|
||||
def test_combine_privileges():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A ")
|
||||
instance.query('CREATE ROLE R1')
|
||||
instance.query('CREATE ROLE R2')
|
||||
@ -80,6 +92,10 @@ def test_combine_privileges():
|
||||
|
||||
|
||||
def test_admin_option():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query("CREATE USER B")
|
||||
instance.query('CREATE ROLE R1')
|
||||
@ -97,6 +113,10 @@ def test_admin_option():
|
||||
|
||||
|
||||
def test_revoke_requires_admin_option():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A, B")
|
||||
instance.query("CREATE ROLE R1, R2")
|
||||
|
||||
@ -139,6 +159,10 @@ def test_revoke_requires_admin_option():
|
||||
|
||||
|
||||
def test_introspection():
|
||||
# Test has known possible deadlocks
|
||||
# TODO Fix as soon as possible
|
||||
if instance.is_built_with_thread_sanitizer():
|
||||
return
|
||||
instance.query("CREATE USER A")
|
||||
instance.query("CREATE USER B")
|
||||
instance.query('CREATE ROLE R1')
|
||||
|
Loading…
Reference in New Issue
Block a user