Add RE-SQL tests for Extensions. Fixes #4453

This commit is contained in:
Nagesh Dhope
2019-07-09 13:23:26 +01:00
committed by Dave Page
parent f085460453
commit 84b712a008
6 changed files with 88 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ Housekeeping
| `Issue #4415 <https://redmine.postgresql.org/issues/4415>`_ - Add Reverse Engineered SQL tests for Roles and Resource Groups.
| `Issue #4441 <https://redmine.postgresql.org/issues/4441>`_ - Add Reverse Engineered SQL tests for FDWs.
| `Issue #4453 <https://redmine.postgresql.org/issues/4453>`_ - Add Reverse Engineered SQL tests for Extensions.
Bug fixes
*********

View File

@@ -0,0 +1,7 @@
-- Extension: sslinfo
-- DROP EXTENSION sslinfo;
CREATE EXTENSION sslinfo
SCHEMA public
VERSION "1.2";

View File

@@ -0,0 +1,7 @@
-- Extension: adminpack
-- DROP EXTENSION adminpack;
CREATE EXTENSION adminpack
SCHEMA pg_catalog
VERSION "1.1";

View File

@@ -0,0 +1,7 @@
-- Extension: sslinfo
-- DROP EXTENSION sslinfo;
CREATE EXTENSION sslinfo
SCHEMA test_extension_schema
VERSION "1.2";

View File

@@ -0,0 +1,7 @@
-- Extension: adminpack
-- DROP EXTENSION adminpack;
CREATE EXTENSION adminpack
SCHEMA pg_catalog
VERSION "1.0";

View File

@@ -0,0 +1,59 @@
{
"scenarios": [
{
"type": "create",
"name": "Create Extension with all options",
"endpoint": "NODE-extension.obj",
"sql_endpoint": "NODE-extension.sql_id",
"data": {
"name": "sslinfo",
"schema": "test_extension_schema",
"version": "1.2"
},
"expected_sql_file": "create_extension_with_all_options.sql"
},
{
"type": "alter",
"name": "Alter Extension version",
"endpoint": "NODE-extension.obj_id",
"sql_endpoint": "NODE-extension.sql_id",
"data": {
"schema": "public"
},
"expected_sql_file": "alter_extension_schema.sql"
},
{
"type": "delete",
"name": "Drop Extension with all options",
"endpoint": "NODE-extension.obj_id",
"data": {}
},
{
"type": "create",
"name": "Create Extension with default(pg_catalog) schema",
"endpoint": "NODE-extension.obj",
"sql_endpoint": "NODE-extension.sql_id",
"data": {
"name": "adminpack",
"version": "1.0"
},
"expected_sql_file": "create_extension_with_default_schema.sql"
},
{
"type": "alter",
"name": "Alter Extension version",
"endpoint": "NODE-extension.obj_id",
"sql_endpoint": "NODE-extension.sql_id",
"data": {
"version": "1.1"
},
"expected_sql_file": "alter_extension_version.sql"
},
{
"type": "delete",
"name": "Drop Extension default(pg_catalog) schema",
"endpoint": "NODE-extension.obj_id",
"data": {}
}
]
}