mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Add test case for cluster discovery with wrong password
This commit is contained in:
parent
012713fc31
commit
6ab507e722
@ -9,6 +9,13 @@
|
||||
<password>password123</password>
|
||||
</discovery>
|
||||
</test_auto_cluster_with_pwd>
|
||||
<test_auto_cluster_with_wrong_pwd>
|
||||
<discovery>
|
||||
<path>/clickhouse/discovery/test_auto_cluster_with_wrong_pwd</path>
|
||||
<user>user1</user>
|
||||
<password>wrongpass1234</password>
|
||||
</discovery>
|
||||
</test_auto_cluster_with_wrong_pwd>
|
||||
</remote_servers>
|
||||
|
||||
</clickhouse>
|
||||
|
@ -42,3 +42,15 @@ def test_connect_with_password(start_cluster):
|
||||
msg="Wrong nodes count in cluster",
|
||||
query_params={"password": "passwordAbc"},
|
||||
)
|
||||
|
||||
result = nodes["node0"].query(
|
||||
"SELECT sum(number) FROM clusterAllReplicas('test_auto_cluster_with_pwd', numbers(3)) GROUP BY hostname()",
|
||||
password="passwordAbc",
|
||||
)
|
||||
assert result == "3\n3\n", result
|
||||
|
||||
result = nodes["node0"].query_and_get_error(
|
||||
"SELECT sum(number) FROM clusterAllReplicas('test_auto_cluster_with_wrong_pwd', numbers(3)) GROUP BY hostname()",
|
||||
password="passwordAbc",
|
||||
)
|
||||
assert "Authentication failed" in result, result
|
||||
|
Loading…
Reference in New Issue
Block a user