Fixed tests + added DROP TABLE to see if it shows up in logs

This commit is contained in:
Vasily Nemkov 2021-03-05 11:49:45 +02:00
parent bfc5cb47cc
commit 4a26e5cd43
2 changed files with 4 additions and 2 deletions

View File

@ -34,12 +34,13 @@ Create CREATE TABLE sqllt.table\n(\n i UInt8, s String\n)\nENGINE = MergeTree
Create CREATE VIEW sqllt.view AS SELECT i, s FROM sqllt.table;
DESCRIBE TABLE sqllt.table FORMAT Null;
Drop DETACH TABLE sqllt.table;
Drop DROP DATABASE IF EXISTS sqllt;
Drop DROP DATABASE IF EXISTS sqllt SYNC;
DROP POLICY IF EXISTS sqllt_policy ON sqllt.table, sqllt.view, sqllt.dictionary;
DROP QUOTA IF EXISTS sqllt_quota;
DROP ROLE IF EXISTS sqllt_role;
DROP ROW POLICY IF EXISTS sqllt_row_policy ON sqllt.table, sqllt.view, sqllt.dictionary;
DROP SETTINGS PROFILE IF EXISTS sqllt_settings_profile;
Drop DROP TABLE sqllt.table SYNC;
DROP USER IF EXISTS sqllt_user;
Grant GRANT DROP ON sqllt.view TO sqllt_user;
Grant GRANT SELECT ON sqllt.table TO sqllt_user;

View File

@ -2,7 +2,7 @@
SET log_comment='system.query_log logging test';
SELECT 'DROP queries and also a cleanup before the test';
DROP DATABASE IF EXISTS sqllt;
DROP DATABASE IF EXISTS sqllt SYNC;
DROP USER IF EXISTS sqllt_user;
DROP ROLE IF EXISTS sqllt_role;
DROP POLICY IF EXISTS sqllt_policy ON sqllt.table, sqllt.view, sqllt.dictionary;
@ -124,6 +124,7 @@ ATTACH TABLE sqllt.table;
RENAME TABLE sqllt.table TO sqllt.table_new;
RENAME TABLE sqllt.table_new TO sqllt.table;
TRUNCATE TABLE sqllt.table;
DROP TABLE sqllt.table SYNC;
---------------------------------------------------------------------------------------------------
-- Now get all logs related to this test