Modified RE-SQL test to cover Password, Account Expire, Connection Limit and Variables for Roles.

This commit is contained in:
Murtuza Zabuawala 2019-08-26 18:25:48 +05:30 committed by Akshay Joshi
parent 53ab4d7e8d
commit 1ddc9cc889
6 changed files with 47 additions and 14 deletions

View File

@ -7,6 +7,10 @@ CREATE ROLE "Role2_$%{}[]()&*^!@""'`\/#" WITH
INHERIT
NOCREATEDB
CREATEROLE
REPLICATION;
NOREPLICATION
CONNECTION LIMIT 100
VALID UNTIL '2050-01-01 00:00:00+05:30';
ALTER ROLE "Role2_$%{}[]()&*^!@""'`\/#" IN DATABASE postgres SET application_name TO 'pg4';
COMMENT ON ROLE "Role2_$%{}[]()&*^!@""'`\/#" IS 'This is detailed description';

View File

@ -7,9 +7,10 @@ CREATE ROLE "Role2_$%{}[]()&*^!@""'`\/#" WITH
INHERIT
CREATEDB
NOCREATEROLE
NOREPLICATION;
NOREPLICATION
CONNECTION LIMIT 100
VALID UNTIL '2050-01-01 00:00:00+05:30';
UPDATE pg_authid SET rolcatupdate=false WHERE rolname = 'Role2_$%{}[]()&*^!@"''`\/#';
ALTER ROLE "Role2_$%{}[]()&*^!@""'`\/#" IN DATABASE postgres SET application_name TO 'pg4';
COMMENT ON ROLE "Role2_$%{}[]()&*^!@""'`\/#" IS 'This is detailed description';

View File

@ -45,12 +45,17 @@
},
{
"type": "alter",
"name": "Alter Role superuser, createdb etc options",
"name": "Alter Role options",
"endpoint": "NODE-role.obj_id",
"sql_endpoint": "NODE-role.sql_id",
"data": {
"rolsuper": true,
"rolcreatedb": true
"rolcreatedb": true,
"rolreplication": false,
"rolpassword": "abc123",
"rolconnlimit": 100,
"rolvaliduntil": "2050-01-01 00:00:00 +05:30",
"variables": { "added": [{"name":"application_name","value":"pg4","database":"postgres"}] }
},
"expected_sql_file": "alter_role_options.sql"
},
@ -105,12 +110,17 @@
},
{
"type": "alter",
"name": "Alter Login Role superuser, createdb etc options",
"name": "Alter Login Role options",
"endpoint": "NODE-role.obj_id",
"sql_endpoint": "NODE-role.sql_id",
"data": {
"rolsuper": false,
"rolcreatedb": false
"rolcreatedb": false,
"rolreplication": false,
"rolpassword": "abc123",
"rolconnlimit": 100,
"rolvaliduntil": "2050-01-01 00:00:00 +05:30",
"variables": { "added": [{"name":"application_name","value":"pg4","database":"postgres"}] }
},
"expected_sql_file": "alter_login_role_options.sql"
},

View File

@ -7,6 +7,10 @@ CREATE ROLE "Role2_$%{}[]()&*^!@""'`\/#" WITH
INHERIT
NOCREATEDB
CREATEROLE
REPLICATION;
NOREPLICATION
CONNECTION LIMIT 100
VALID UNTIL '2050-01-01 00:00:00+05:30';
ALTER ROLE "Role2_$%{}[]()&*^!@""'`\/#" IN DATABASE postgres SET application_name TO 'pg4';
COMMENT ON ROLE "Role2_$%{}[]()&*^!@""'`\/#" IS 'This is detailed description';

View File

@ -7,6 +7,10 @@ CREATE ROLE "Role2_$%{}[]()&*^!@""'`\/#" WITH
INHERIT
CREATEDB
NOCREATEROLE
NOREPLICATION;
NOREPLICATION
CONNECTION LIMIT 100
VALID UNTIL '2050-01-01 00:00:00+05:30';
ALTER ROLE "Role2_$%{}[]()&*^!@""'`\/#" IN DATABASE postgres SET application_name TO 'pg4';
COMMENT ON ROLE "Role2_$%{}[]()&*^!@""'`\/#" IS 'This is detailed description';

View File

@ -45,12 +45,17 @@
},
{
"type": "alter",
"name": "Alter Role superuser, createdb etc options",
"name": "Alter Role options",
"endpoint": "NODE-role.obj_id",
"sql_endpoint": "NODE-role.sql_id",
"data": {
"rolsuper": true,
"rolcreatedb": true
"rolcreatedb": true,
"rolreplication": false,
"rolpassword": "abc123",
"rolconnlimit": 100,
"rolvaliduntil": "2050-01-01 00:00:00 +05:30",
"variables": { "added": [{"name":"application_name","value":"pg4","database":"postgres"}] }
},
"expected_sql_file": "alter_role_options.sql"
},
@ -105,12 +110,17 @@
},
{
"type": "alter",
"name": "Alter Login Role superuser, createdb etc options",
"name": "Alter Login Role options",
"endpoint": "NODE-role.obj_id",
"sql_endpoint": "NODE-role.sql_id",
"data": {
"rolsuper": false,
"rolcreatedb": false
"rolcreatedb": false,
"rolreplication": false,
"rolpassword": "abc123",
"rolconnlimit": 100,
"rolvaliduntil": "2050-01-01 00:00:00 +05:30",
"variables": { "added": [{"name":"application_name","value":"pg4","database":"postgres"}] }
},
"expected_sql_file": "alter_login_role_options.sql"
},