1) Ensure re_sql tests should not abort at the first failure, it should run all the test cases.

2) Added place holder for owner, so we won't need to create separate pg/ppas folder just because of change in the owner name.
This commit is contained in:
Akshay Joshi
2019-07-09 15:37:53 +05:30
parent f4ac1e804e
commit 1a9d8f01aa
20 changed files with 170 additions and 30 deletions

View File

@@ -6,7 +6,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1', opt2 'valopt2');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -5,7 +5,7 @@
CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -6,7 +6,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -6,7 +6,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1', opt2 'val2');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -7,7 +7,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1');
ALTER FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -7,7 +7,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -5,4 +5,4 @@
CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;

View File

@@ -7,7 +7,6 @@
"sql_endpoint": "NODE-foreign_data_wrapper.sql_id",
"data": {
"name": "Fdw1_$%{}[]()&*^!@\"'`\\/#",
"fdwowner": "postgres",
"fdwacl": [],
"fdwoptions": []
},

View File

@@ -6,7 +6,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1', opt2 'valopt2');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -5,7 +5,7 @@
CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -6,7 +6,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -6,7 +6,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1', opt2 'val2');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -7,7 +7,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""`\/#"
OPTIONS (opt1 'val1');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -7,7 +7,7 @@ CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OPTIONS (opt1 'val1');
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;
COMMENT ON FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
IS 'a comment';

View File

@@ -5,4 +5,4 @@
CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
ALTER FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
OWNER TO postgres;
OWNER TO <OWNER>;

View File

@@ -7,7 +7,6 @@
"sql_endpoint": "NODE-foreign_data_wrapper.sql_id",
"data": {
"name": "Fdw1_$%{}[]()&*^!@\"'`\\/#",
"fdwowner": "postgres",
"fdwacl": [],
"fdwoptions": []
},

View File

@@ -0,0 +1,11 @@
-- Language: Lan1_$%{}[]()&*^!@"'`\/#
-- DROP LANGUAGE "Lan1_$%{}[]()&*^!@""'`\/#"
CREATE TRUSTED PROCEDURAL LANGUAGE "Lan1_$%{}[]()&*^!@""'`\/#"
HANDLER plpgsql_call_handler
INLINE plpgsql_inline_handler
VALIDATOR plpgsql_validator;
ALTER LANGUAGE "Lan1_$%{}[]()&*^!@""'`\/#"
OWNER TO <OWNER>;

View File

@@ -0,0 +1,11 @@
-- Language: Lan1_$%{}[]()&*^!@"'`\/#
-- DROP LANGUAGE "Lan1_$%{}[]()&*^!@""'`\/#"
CREATE TRUSTED PROCEDURAL LANGUAGE "Lan1_$%{}[]()&*^!@""'`\/#"
HANDLER plpgsql_call_handler
INLINE plpgsql_inline_handler
VALIDATOR plpgsql_validator;
ALTER LANGUAGE "Lan1_$%{}[]()&*^!@""'`\/#"
OWNER TO <OWNER>;

View File

@@ -0,0 +1,43 @@
{
"scenarios": [
{
"type": "create",
"name": "Create Resource groups",
"endpoint": "NODE-resource_group.obj",
"sql_endpoint": "NODE-resource_group.sql_id",
"data": {
"name": "Rg1_$%{}[]()&*^!@\"'`\\/#",
"cpu_rate_limit": 0,
"dirty_rate_limit": 0
},
"expected_sql_file": "create_resource_group.sql"
},
{
"type": "alter",
"name": "Alter Resource groups name",
"endpoint": "NODE-resource_group.obj_id",
"sql_endpoint": "NODE-resource_group.sql_id",
"data": {
"name": "Rg2_$%{}[]()&*^!@\"'`\\/#"
},
"expected_sql_file": "alter_resource_group_name.sql"
},
{
"type": "alter",
"name": "Alter Resource groups options",
"endpoint": "NODE-resource_group.obj_id",
"sql_endpoint": "NODE-resource_group.sql_id",
"data": {
"cpu_rate_limit": 1,
"dirty_rate_limit": 5
},
"expected_sql_file": "alter_resource_group_options.sql"
},
{
"type": "delete",
"name": "Drop Resource groups",
"endpoint": "NODE-resource_group.obj_id",
"data": {}
}
]
}