mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
fix tests and add new one
This commit is contained in:
parent
93cbd4bf9a
commit
921947e368
@ -219,6 +219,6 @@ def test_create_user():
|
||||
instance.query(
|
||||
"SELECT name, auth_type, auth_params FROM system.users WHERE name IN ['emma', 'lucy'] ORDER BY name"
|
||||
)
|
||||
== 'emma\tssl_certificate\t{"common_names":["client2"]}\n'
|
||||
'lucy\tssl_certificate\t{"common_names":["client2","client3"]}\n'
|
||||
== 'emma\t[\'ssl_certificate\']\t[\'{"common_names":["client2"]}\']\n'
|
||||
'lucy\t[\'ssl_certificate\']\t[\'{"common_names":["client2","client3"]}\']\n'
|
||||
)
|
||||
|
@ -106,10 +106,10 @@ CREATE USER u2_01292 IDENTIFIED WITH no_password DEFAULT ROLE r1_01292, r2_01292
|
||||
CREATE USER u3_01292 IDENTIFIED WITH no_password HOST LIKE \'%.%.myhost.com\' DEFAULT ROLE r1_01292, r2_01292
|
||||
CREATE USER u4_01292 IDENTIFIED WITH no_password HOST LIKE \'%.%.myhost.com\' DEFAULT ROLE r1_01292, r2_01292
|
||||
-- system.users
|
||||
u1_01292 local_directory plaintext_password {} [] ['localhost'] [] [] 1 [] []
|
||||
u2_01292 local_directory no_password {} [] [] [] ['%.%.myhost.com'] 0 [] []
|
||||
u3_01292 local_directory sha256_password {} ['192.169.1.1','192.168.0.0/16'] ['localhost'] [] [] 0 ['r1_01292'] []
|
||||
u4_01292 local_directory double_sha1_password {} ['::/0'] [] [] [] 1 [] ['r1_01292']
|
||||
u1_01292 local_directory ['plaintext_password'] ['{}'] [] ['localhost'] [] [] 1 [] []
|
||||
u2_01292 local_directory ['no_password'] ['{}'] [] [] [] ['%.%.myhost.com'] 0 [] []
|
||||
u3_01292 local_directory ['sha256_password'] ['{}'] ['192.169.1.1','192.168.0.0/16'] ['localhost'] [] [] 0 ['r1_01292'] []
|
||||
u4_01292 local_directory ['double_sha1_password'] ['{}'] ['::/0'] [] [] [] 1 [] ['r1_01292']
|
||||
-- system.settings_profile_elements
|
||||
\N u1_01292 \N 0 readonly 1 \N \N \N \N
|
||||
\N u2_01292 \N 0 \N \N \N \N \N default
|
||||
@ -117,3 +117,5 @@ u4_01292 local_directory double_sha1_password {} ['::/0'] [] [] [] 1 [] ['r1_012
|
||||
\N u4_01292 \N 0 \N \N \N \N \N default
|
||||
\N u4_01292 \N 1 max_memory_usage 5000000 \N \N \N \N
|
||||
\N u4_01292 \N 2 readonly 1 \N \N \N \N
|
||||
-- multiple authentication methods
|
||||
u1_01292 ['plaintext_password','kerberos','bcrypt_password','ldap'] ['{}','{"realm":"qwerty10"}','{}','{"server":"abc"}']
|
||||
|
@ -233,3 +233,8 @@ SELECT * FROM system.settings_profile_elements WHERE user_name LIKE 'u%\_01292'
|
||||
DROP USER u1_01292, u2_01292, u3_01292, u4_01292, u5_01292;
|
||||
|
||||
DROP ROLE r1_01292, r2_01292;
|
||||
|
||||
SELECT '-- multiple authentication methods';
|
||||
CREATE USER u1_01292 IDENTIFIED WITH plaintext_password by '1', kerberos REALM 'qwerty10', bcrypt_password by '3', ldap SERVER 'abc';
|
||||
SELECT name, auth_type, auth_params FROM system.users WHERE name = 'u1_01292' ORDER BY name;
|
||||
DROP USER u1_01292;
|
||||
|
Loading…
Reference in New Issue
Block a user