Add msql tests for FTS Dictionaries

This commit is contained in:
Nagesh Dhope 2019-09-06 16:00:33 +01:00 committed by Dave Page
parent 72505b27cb
commit db06dd0275
10 changed files with 256 additions and 3 deletions

View File

@ -0,0 +1,2 @@
ALTER TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1"
(stopwords);

View File

@ -0,0 +1,8 @@
ALTER TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#"
RENAME TO "Test Dictionary Edit#1";
ALTER TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1"
(stopwords=english);
COMMENT ON TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1"
IS 'Test Description';

View File

@ -0,0 +1,3 @@
CREATE TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#" (
TEMPLATE = simple
);

View File

@ -5,6 +5,7 @@
"name": "Create FTS Dictionary",
"endpoint": "NODE-fts_dictionary.obj",
"sql_endpoint": "NODE-fts_dictionary.sql_id",
"msql_endpoint": "NODE-fts_dictionary.msql",
"data": {
"name": "Dictionary1_$%{}[]()&*^!@\"'`\\/#",
"template": "simple",
@ -13,13 +14,15 @@
"schema_id": "<SCHEMA_ID>",
"owner": "postgres"
},
"expected_sql_file": "create_fts_dictionary.sql"
"expected_sql_file": "create_fts_dictionary.sql",
"expected_msql_file": "msql_create_fts_dictionary.sql"
},
{
"type": "alter",
"name": "Alter FTS Dictionary",
"endpoint": "NODE-fts_dictionary.obj_id",
"sql_endpoint": "NODE-fts_dictionary.sql_id",
"msql_endpoint": "NODE-fts_dictionary.msql_id",
"data": {
"name": "Test Dictionary Edit#1",
"description": "Test Description",
@ -32,13 +35,15 @@
]
}
},
"expected_sql_file": "alter_fts_dictionary_options.sql"
"expected_sql_file": "alter_fts_dictionary_options.sql",
"expected_msql_file": "msql_alter_fts_dictionary_options.sql"
},
{
"type": "alter",
"name": "Alter FTS Dictionary | Delete Options",
"endpoint": "NODE-fts_dictionary.obj_id",
"sql_endpoint": "NODE-fts_dictionary.sql_id",
"msql_endpoint": "NODE-fts_dictionary.msql_id",
"data": {
"options": {
"deleted": [
@ -49,7 +54,8 @@
]
}
},
"expected_sql_file": "alter_fts_dictionary_delete_options.sql"
"expected_sql_file": "alter_fts_dictionary_delete_options.sql",
"expected_msql_file": "msql_alter_fts_dictionary_delete_options.sql"
},
{
"type": "delete",

View File

@ -0,0 +1,13 @@
-- View: public."testmview_$%{}[]()&*^!@""'`\/#"
-- DROP MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#";
CREATE MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#"
TABLESPACE pg_default
AS
SELECT test_mview_table.col1
FROM test_mview_table
WITH DATA;
ALTER TABLE public."testmview_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;

View File

@ -0,0 +1,17 @@
-- View: public."testmview_$%{}[]()&*^!@""'`\/#"
-- DROP MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#";
CREATE MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#"
TABLESPACE pg_default
AS
SELECT test_mview_table.col1
FROM test_mview_table
WITH NO DATA;
ALTER TABLE public."testmview_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
COMMENT ON MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#"
IS 'Testcomment';

View File

@ -0,0 +1,87 @@
{
"scenarios": [{
"type": "create",
"name": "Create Table for MViews",
"endpoint": "NODE-table.obj",
"sql_endpoint": "NODE-table.sql_id",
"data": {
"name": "test_mview_table",
"check_constraint": [],
"coll_inherits": "[]",
"columns": [{
"name": "col1",
"cltype": "integer"
}],
"schema": "public"
}
},
{
"type": "create",
"name": "Create MView",
"endpoint": "NODE-mview.obj",
"sql_endpoint": "NODE-mview.sql_id",
"data": {
"definition": "select col1 from test_mview_table;",
"name": "testmview_$%{}[]()&*^!@\"'`\\/#",
"owner": "postgres",
"schema": "public",
"comment": "Testcomment",
"autovacuum_enabled": false,
"datacl": [],
"seclabels": [],
"toast_autovacuum_enabled": false,
"vacuum_table": [{
"name": "autovacuum_analyze_scale_factor"
}],
"vacuum_toast": [{
"name": "autovacuum_freeze_max_age"
}]
},
"expected_sql_file": "create_mview.sql"
},
{
"type": "alter",
"name": "Alter MView",
"endpoint": "NODE-mview.obj_id",
"sql_endpoint": "NODE-mview.sql_id",
"data": {
"definition": "select col1 from test_mview_table;",
"name": "testmview_$%{}[]()&*^!@\"'`\\/#",
"owner": "postgres",
"schema": "public",
"comment": "Testcomment",
"autovacuum_enabled": false,
"datacl": [],
"seclabels": [],
"toast_autovacuum_enabled": false,
"vacuum_table": [{
"name": "autovacuum_analyze_scale_factor"
}],
"vacuum_toast": [{
"name": "autovacuum_freeze_max_age"
}]
},
"expected_sql_file": "alter_mview.sql"
},
{
"type": "delete",
"name": "Drop MView",
"endpoint": "NODE-mview.obj_id",
"data": {
"name": "testmview_$%{}[]()&*^!@\"'`\\/#",
"owner": "postgres",
"schema": "public"
}
},
{
"type": "delete",
"name": "Drop Table for mview",
"endpoint": "NODE-table.obj_id",
"data": {
"name": "test_mview_table",
"owner": "postgres",
"schema": "public"
}
}
]
}

View File

@ -0,0 +1,13 @@
-- View: public."testmview_$%{}[]()&*^!@""'`\/#"
-- DROP MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#";
CREATE MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#"
TABLESPACE pg_default
AS
SELECT test_mview_table.col1
FROM test_mview_table
WITH DATA;
ALTER TABLE public."testmview_$%{}[]()&*^!@""'`\/#"
OWNER TO enterprisedb;

View File

@ -0,0 +1,17 @@
-- View: public."testmview_$%{}[]()&*^!@""'`\/#"
-- DROP MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#";
CREATE MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#"
TABLESPACE pg_default
AS
SELECT test_mview_table.col1
FROM test_mview_table
WITH NO DATA;
ALTER TABLE public."testmview_$%{}[]()&*^!@""'`\/#"
OWNER TO enterprisedb;
COMMENT ON MATERIALIZED VIEW public."testmview_$%{}[]()&*^!@""'`\/#"
IS 'Testcomment';

View File

@ -0,0 +1,87 @@
{
"scenarios": [{
"type": "create",
"name": "Create Table for MViews",
"endpoint": "NODE-table.obj",
"sql_endpoint": "NODE-table.sql_id",
"data": {
"name": "test_mview_table",
"check_constraint": [],
"coll_inherits": "[]",
"columns": [{
"name": "col1",
"cltype": "integer"
}],
"schema": "public"
}
},
{
"type": "create",
"name": "Create MView",
"endpoint": "NODE-mview.obj",
"sql_endpoint": "NODE-mview.sql_id",
"data": {
"definition": "select col1 from test_mview_table;",
"name": "testmview_$%{}[]()&*^!@\"'`\\/#",
"owner": "enterprisedb",
"schema": "public",
"comment": "Testcomment",
"autovacuum_enabled": false,
"datacl": [],
"seclabels": [],
"toast_autovacuum_enabled": false,
"vacuum_table": [{
"name": "autovacuum_analyze_scale_factor"
}],
"vacuum_toast": [{
"name": "autovacuum_freeze_max_age"
}]
},
"expected_sql_file": "create_mview.sql"
},
{
"type": "alter",
"name": "Alter MView",
"endpoint": "NODE-mview.obj_id",
"sql_endpoint": "NODE-mview.sql_id",
"data": {
"definition": "select col1 from test_mview_table;",
"name": "testmview_$%{}[]()&*^!@\"'`\\/#",
"owner": "enterprisedb",
"schema": "public",
"comment": "Testcomment",
"autovacuum_enabled": false,
"datacl": [],
"seclabels": [],
"toast_autovacuum_enabled": false,
"vacuum_table": [{
"name": "autovacuum_analyze_scale_factor"
}],
"vacuum_toast": [{
"name": "autovacuum_freeze_max_age"
}]
},
"expected_sql_file": "alter_mview.sql"
},
{
"type": "delete",
"name": "Drop MView",
"endpoint": "NODE-mview.obj_id",
"data": {
"name": "testmview_$%{}[]()&*^!@\"'`\\/#",
"owner": "enterprisedb",
"schema": "public"
}
},
{
"type": "delete",
"name": "Drop Table for mview",
"endpoint": "NODE-table.obj_id",
"data": {
"name": "test_mview_table",
"owner": "postgres",
"schema": "public"
}
}
]
}