Skip to content

Commit

Permalink
Fix ownership/permission_restrictions_from_pg expected test outputs f…
Browse files Browse the repository at this point in the history
…or PG16

Signed-off-by: Jason Teng <[email protected]>
  • Loading branch information
Jason Teng committed Dec 28, 2023
1 parent 0c4fc4e commit a92abcc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
14 changes: 1 addition & 13 deletions test/JDBC/expected/ownership_restrictions_from_pg.out
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CREATE USER ownership_restrictions_from_pg_user_by_pg_login2;
GO
~~ERROR (Code: 33557097)~~

~~ERROR (Message: errstart was not called)~~
~~ERROR (Message: role "ownership_restrictions_from_pg_user_by_pg_login2" does not exist)~~



Expand Down Expand Up @@ -449,8 +449,6 @@ GO
Server SQLState: 42501)~~


-- tsql user=ownership_restrictions_from_pg_login1 password=12345678

-- psql user=ownership_restrictions_from_pg_login1 password=12345678
ALTER ROLE ownership_restrictions_from_pg_login1 set babelfishpg_tsql.ownership_restrictions_from_pg_test_variable = 101;
GO
Expand Down Expand Up @@ -915,16 +913,6 @@ GO
~~START~~
bool
t
t
~~END~~


SELECT pg_terminate_backend(pid) FROM pg_stat_get_activity(NULL)
WHERE sys.suser_name(usesysid) = 'ownership_restrictions_from_pg_login2' AND backend_type = 'client backend' AND usesysid IS NOT NULL;
GO
~~START~~
bool
t
~~END~~


Expand Down
23 changes: 17 additions & 6 deletions test/JDBC/expected/permission_restrictions_from_pg.out
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ grant sysadmin to permission_restrictions_tsql_login;
go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: must have admin option on role "sysadmin"
~~ERROR (Message: ERROR: permission denied to grant role "sysadmin"
Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role.
Server SQLState: 42501)~~


Expand All @@ -22,6 +23,7 @@ go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: permission denied to create role
Detail: Only roles with the CREATEROLE attribute may create roles.
Server SQLState: 42501)~~


Expand All @@ -30,7 +32,8 @@ grant sysadmin to permission_restrictions_psql_user;
go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: must have admin option on role "sysadmin"
~~ERROR (Message: ERROR: permission denied to grant role "sysadmin"
Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role.
Server SQLState: 42501)~~


Expand All @@ -39,7 +42,8 @@ alter user permission_restrictions_psql_user with password '123'
go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: permission denied
~~ERROR (Message: ERROR: permission denied to alter role
Detail: To change another role's password, the current user must have the CREATEROLE attribute and the ADMIN option on the role.
Server SQLState: 42501)~~


Expand All @@ -49,6 +53,7 @@ go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: permission denied to drop role
Detail: Only roles with the CREATEROLE attribute and the ADMIN option on the target roles may drop roles.
Server SQLState: 42501)~~


Expand All @@ -58,7 +63,8 @@ grant sysadmin to permission_restrictions_tsql_login;
go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: must have admin option on role "sysadmin"
~~ERROR (Message: ERROR: permission denied to grant role "sysadmin"
Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role.
Server SQLState: 42501)~~


Expand All @@ -68,6 +74,7 @@ go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: permission denied to create role
Detail: Only roles with the CREATEROLE attribute may create roles.
Server SQLState: 42501)~~


Expand All @@ -76,7 +83,8 @@ grant sysadmin to permission_restrictions_psql_user;
go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: must have admin option on role "sysadmin"
~~ERROR (Message: ERROR: permission denied to grant role "sysadmin"
Detail: Only roles with the ADMIN option on role "sysadmin" may grant this role.
Server SQLState: 42501)~~


Expand All @@ -85,7 +93,8 @@ alter user permission_restrictions_tsql_login with password '123'
go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: permission denied
~~ERROR (Message: ERROR: permission denied to alter role
Detail: To change another role's password, the current user must have the CREATEROLE attribute and the ADMIN option on the role.
Server SQLState: 42501)~~


Expand All @@ -95,6 +104,7 @@ go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: permission denied to drop role
Detail: Only roles with the CREATEROLE attribute and the ADMIN option on the target roles may drop roles.
Server SQLState: 42501)~~


Expand Down Expand Up @@ -135,6 +145,7 @@ go
~~ERROR (Code: 0)~~

~~ERROR (Message: ERROR: permission denied to create role
Detail: Only roles with the CREATEROLE attribute may create roles.
Server SQLState: 42501)~~


Expand Down

0 comments on commit a92abcc

Please sign in to comment.