Skip to content

Commit d9c509e

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

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
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: 15 additions & 4 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

@@ -32,14 +35,22 @@ statement ok
3235
CREATE USER IF NOT EXISTS 'test-d@localhost' IDENTIFIED WITH sha256_password BY 'password';
3336

3437
statement ok
35-
DROP USER 'test-a'@'localhost';
38+
CREATE USER IF NOT EXISTS 'test-e' IDENTIFIED BY '123' WITH DEFAULT_ROLE = 'role1';
39+
40+
statement ok
41+
DROP USER IF EXISTS 'test-a'@'localhost';
42+
43+
statement ok
44+
DROP USER IF EXISTS 'test-b'@'localhost';
3645

3746
statement ok
38-
DROP USER 'test-b'@'localhost';
47+
DROP USER IF EXISTS 'test-c'@'localhost';
3948

4049
statement ok
41-
DROP USER 'test-c'@'localhost';
50+
DROP USER IF EXISTS 'test-d@localhost';
4251

4352
statement ok
44-
DROP USER 'test-d@localhost';
53+
DROP USER IF EXISTS 'test-d@localhost';
4554

55+
statement ok
56+
DROP USER IF EXISTS '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)