Skip to content

Commit

Permalink
test(sqlness): release databases after tests (GreptimeTeam#3648)
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu authored and killme2008 committed Apr 8, 2024
1 parent bb601fa commit 48ccca8
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 17 deletions.
4 changes: 4 additions & 0 deletions tests/cases/standalone/common/create/create_database.result
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ show databases;
| public |
+--------------------+

drop database 'illegal-database';

Affected Rows: 0

2 changes: 2 additions & 0 deletions tests/cases/standalone/common/create/create_database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ create database 'illegal-database';
create database '㊙️database';

show databases;

drop database 'illegal-database';
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ drop table abcdefge;

Affected Rows: 0

drop database upper_case_table_name;

Affected Rows: 0

use public;

Affected Rows: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ desc table abcdefge;

drop table abcdefge;

drop database upper_case_table_name;

use public;
16 changes: 7 additions & 9 deletions tests/cases/standalone/common/show/show_databases_tables.result
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
show databases;

+-----------------------+
| Database |
+-----------------------+
| greptime_private |
| illegal-database |
| information_schema |
| public |
| upper_case_table_name |
+-----------------------+
+--------------------+
| Database |
+--------------------+
| greptime_private |
| information_schema |
| public |
+--------------------+

use information_schema;

Expand Down
14 changes: 6 additions & 8 deletions tests/cases/standalone/common/system/information_schema.result
Original file line number Diff line number Diff line change
Expand Up @@ -515,14 +515,12 @@ desc table schemata;

select * from schemata where catalog_name = 'greptime' and schema_name != 'public' order by catalog_name, schema_name;

+--------------+-----------------------+----------------------------+------------------------+----------+
| catalog_name | schema_name | default_character_set_name | default_collation_name | sql_path |
+--------------+-----------------------+----------------------------+------------------------+----------+
| greptime | greptime_private | utf8 | utf8_bin | |
| greptime | illegal-database | utf8 | utf8_bin | |
| greptime | information_schema | utf8 | utf8_bin | |
| greptime | upper_case_table_name | utf8 | utf8_bin | |
+--------------+-----------------------+----------------------------+------------------------+----------+
+--------------+--------------------+----------------------------+------------------------+----------+
| catalog_name | schema_name | default_character_set_name | default_collation_name | sql_path |
+--------------+--------------------+----------------------------+------------------------+----------+
| greptime | greptime_private | utf8 | utf8_bin | |
| greptime | information_schema | utf8 | utf8_bin | |
+--------------+--------------------+----------------------------+------------------------+----------+

-- test engines
select * from engines;
Expand Down
4 changes: 4 additions & 0 deletions tests/cases/standalone/common/tql/case_sensitive.result
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ drop table "AnotherSchema"."MemTotal";

Affected Rows: 0

drop schema "AnotherSchema";

Affected Rows: 0

2 changes: 2 additions & 0 deletions tests/cases/standalone/common/tql/case_sensitive.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ tql eval (0,10,'5s') sum(MemAvailable / 4) + sum({__name__="AnotherSchema.MemTot
drop table "MemAvailable";

drop table "AnotherSchema"."MemTotal";

drop schema "AnotherSchema";

0 comments on commit 48ccca8

Please sign in to comment.