Skip to content

Commit 61f1163

Browse files
committed
test: add test case about create user
1 parent 193b828 commit 61f1163

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

tests/logictest/suites/gen/05_ddl/05_0004_ddl_create_user

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
statement ok
2+
DROP USER IF EXISTS 'test-a'@'localhost';
3+
4+
statement ok
5+
DROP USER IF EXISTS 'test-b'@'localhost';
6+
7+
statement ok
8+
DROP USER IF EXISTS 'test-c'@'localhost';
9+
10+
statement ok
11+
DROP USER IF EXISTS 'test-d@localhost';
12+
113
statement ok
214
CREATE USER 'test-a'@'localhost' IDENTIFIED BY 'password';
315

tests/logictest/suites/gen/05_ddl/05_0004_ddl_create_user_v2

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ DROP USER IF EXISTS 'test-c'@'localhost';
1313
statement ok
1414
DROP USER IF EXISTS 'test-d@localhost';
1515

16+
statement ok
17+
DROP USER IF EXISTS 'test-e';
18+
1619
statement ok
1720
CREATE USER 'test-a'@'localhost' IDENTIFIED BY 'password';
1821

@@ -31,6 +34,9 @@ CREATE USER 'test-d@localhost' IDENTIFIED WITH sha256_password BY 'password';
3134
statement ok
3235
CREATE USER IF NOT EXISTS 'test-d@localhost' IDENTIFIED WITH sha256_password BY 'password';
3336

37+
statement ok
38+
CREATE USER IF NOT EXISTS 'test-e' IDENTIFIED BY '123' WITH DEFAULT_ROLE = 'role1';
39+
3440
statement ok
3541
DROP USER 'test-a'@'localhost';
3642

@@ -43,3 +49,8 @@ DROP USER 'test-c'@'localhost';
4349
statement ok
4450
DROP USER 'test-d@localhost';
4551

52+
statement ok
53+
DROP USER 'test-d@localhost';
54+
55+
statement ok
56+
DROP USER 'test-e';

tests/logictest/suites/gen/05_ddl/05_0005_ddl_alter_user_v2

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ ALTER USER 'test-i@localhost' IDENTIFIED WITH sha256_password BY 'new-password';
4343
statement ok
4444
ALTER USER 'test-h'@'localhost' WITH DEFAULT_ROLE = 'role1';
4545

46-
statement query I
47-
SELECT * FROM system.users;
48-
4946
statement ok
5047
DROP USER IF EXISTS 'test-e'@'localhost';
5148

0 commit comments

Comments
 (0)