mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix tests
This commit is contained in:
parent
def8611d2c
commit
908be1e324
@ -11,6 +11,7 @@
|
||||
#include <Parsers/Access/ASTRowPolicyName.h>
|
||||
#include <Parsers/Access/ASTAuthenticationData.h>
|
||||
#include <Parsers/ASTLiteral.h>
|
||||
#include <Parsers/ASTExpressionList.h>
|
||||
#include <Parsers/ExpressionListParsers.h>
|
||||
#include <Parsers/formatAST.h>
|
||||
#include <Parsers/parseQuery.h>
|
||||
@ -91,9 +92,11 @@ namespace
|
||||
{
|
||||
node->expect_common_names = true;
|
||||
|
||||
auto list = std::make_shared<ASTExpressionList>();
|
||||
for (const auto & name : auth_data.getSSLCertificateCommonNames())
|
||||
node->children.push_back(std::make_shared<ASTLiteral>(name));
|
||||
list->children.push_back(std::make_shared<ASTLiteral>(name));
|
||||
|
||||
node->children.push_back(std::move(list));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ INSTANTIATE_TEST_SUITE_P(ParserCreateUserQuery, ParserTest,
|
||||
::testing::ValuesIn(std::initializer_list<ParserTestCase>{
|
||||
{
|
||||
"CREATE USER user1 IDENTIFIED WITH sha256_password BY 'qwe123'",
|
||||
"CREATE USER user1 IDENTIFIED WITH sha256_hash BY '[A-Za-z0-9]{64}' SALT '[A-Za-z0-9]{64}'"
|
||||
"CREATE USER user1 IDENTIFIED WITH sha256_password BY 'qwe123'"
|
||||
},
|
||||
{
|
||||
"CREATE USER user1 IDENTIFIED WITH sha256_hash BY '7A37B85C8918EAC19A9089C0FA5A2AB4DCE3F90528DCDEEC108B23DDF3607B99' SALT 'salt'",
|
||||
@ -269,7 +269,7 @@ INSTANTIATE_TEST_SUITE_P(ParserCreateUserQuery, ParserTest,
|
||||
},
|
||||
{
|
||||
"ALTER USER user1 IDENTIFIED WITH sha256_password BY 'qwe123'",
|
||||
"ALTER USER user1 IDENTIFIED WITH sha256_hash BY '[A-Za-z0-9]{64}' SALT '[A-Za-z0-9]{64}'"
|
||||
"ALTER USER user1 IDENTIFIED WITH sha256_password BY 'qwe123'"
|
||||
},
|
||||
{
|
||||
"ALTER USER user1 IDENTIFIED WITH sha256_hash BY '7A37B85C8918EAC19A9089C0FA5A2AB4DCE3F90528DCDEEC108B23DDF3607B99' SALT 'salt'",
|
||||
|
@ -95,14 +95,14 @@ def test_create_alter_user():
|
||||
|
||||
check_logs(
|
||||
must_contain=[
|
||||
"CREATE USER u1 IDENTIFIED WITH sha256_password",
|
||||
"ALTER USER u1 IDENTIFIED WITH sha256_password",
|
||||
"CREATE USER u1 IDENTIFIED",
|
||||
"ALTER USER u1 IDENTIFIED",
|
||||
"CREATE USER u2 IDENTIFIED WITH plaintext_password",
|
||||
],
|
||||
must_not_contain=[
|
||||
password,
|
||||
"IDENTIFIED WITH sha256_password BY",
|
||||
"IDENTIFIED WITH sha256_hash BY",
|
||||
"IDENTIFIED BY",
|
||||
"IDENTIFIED BY",
|
||||
"IDENTIFIED WITH plaintext_password BY",
|
||||
],
|
||||
)
|
||||
|
@ -47,5 +47,5 @@ def test_complexity_rules(start_cluster):
|
||||
def test_default_password_type(start_cluster):
|
||||
node2.query("CREATE USER u1 IDENTIFIED BY 'pwd'")
|
||||
|
||||
required_type = "DOUBLE_SHA1_PASSWORD"
|
||||
required_type = "double_sha1_password"
|
||||
assert required_type in node2.query("SHOW CREATE USER u1")
|
||||
|
Loading…
Reference in New Issue
Block a user