diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_login_role_options.sql b/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_login_role_options.sql index a40faf938..046d06912 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_login_role_options.sql +++ b/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_login_role_options.sql @@ -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'; diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_role_options.sql b/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_role_options.sql index 2fbe32369..fb8b74a7f 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_role_options.sql +++ b/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/alter_role_options.sql @@ -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'; diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/test.json b/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/test.json index 6a3f65b26..3a2bc9427 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/test.json +++ b/web/pgadmin/browser/server_groups/servers/roles/tests/9.1_plus/test.json @@ -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" }, diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_login_role_options.sql b/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_login_role_options.sql index a40faf938..046d06912 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_login_role_options.sql +++ b/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_login_role_options.sql @@ -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'; diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_role_options.sql b/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_role_options.sql index 6ba594ade..fb8b74a7f 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_role_options.sql +++ b/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/alter_role_options.sql @@ -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'; diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/test.json b/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/test.json index 6a3f65b26..3a2bc9427 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/test.json +++ b/web/pgadmin/browser/server_groups/servers/roles/tests/9.4_plus/test.json @@ -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" },