diff --git a/sbroad b/sbroad index c87bf3d8d4feaed22018a20413dfbcddff42e4a9..4e5d87d815d51e81873184c15f8e1f729e87d16d 160000 --- a/sbroad +++ b/sbroad @@ -1 +1 @@ -Subproject commit c87bf3d8d4feaed22018a20413dfbcddff42e4a9 +Subproject commit 4e5d87d815d51e81873184c15f8e1f729e87d16d diff --git a/test/int/test_plugin.py b/test/int/test_plugin.py index f315a669a5c824386a9adf245d049802039c8cbb..4b99ab545289b662a5898f7ddd1d276d16842850 100644 --- a/test/int/test_plugin.py +++ b/test/int/test_plugin.py @@ -2740,19 +2740,23 @@ def test_sql_interface_inheritance(cluster: Cluster): def test_plugin_sql_permission_denied(cluster: Cluster): [i1] = cluster.deploy(instance_count=1) + user = "alex" + password = "L0ng enough" + + i1.sql(f"""CREATE USER "{user}" WITH PASSWORD '{password}' using chap-sha1""") with pytest.raises(TarantoolError) as e: - i1.sql(f"CREATE PLUGIN {_PLUGIN} 0.1.0", user="guest") + i1.sql(f"CREATE PLUGIN {_PLUGIN} 0.1.0", user=user, password=password) assert e.value.args[:2] == ( "ER_ACCESS_DENIED", - "Plugin system access is denied for user 'guest'", + "Plugin system access is denied for user 'alex'", ) # Access is checked before plugin name validation with pytest.raises(TarantoolError) as e: - i1.sql("CREATE PLUGIN no_such_plugin 0.1.0", user="guest") + i1.sql("CREATE PLUGIN no_such_plugin 0.1.0", user=user, password=password) assert e.value.args[:2] == ( "ER_ACCESS_DENIED", - "Plugin system access is denied for user 'guest'", + "Plugin system access is denied for user 'alex'", ) # Create as superuser to check the rest of commands @@ -2761,30 +2765,31 @@ def test_plugin_sql_permission_denied(cluster: Cluster): with pytest.raises(TarantoolError) as e: i1.sql( f'ALTER PLUGIN {_PLUGIN} 0.1.0 ADD SERVICE no_such_service TO TIER "{_DEFAULT_TIER}"', - user="guest", + user=user, + password=password, ) assert e.value.args[:2] == ( "ER_ACCESS_DENIED", - "Plugin system access is denied for user 'guest'", + "Plugin system access is denied for user 'alex'", ) with pytest.raises(TarantoolError) as e: - i1.sql(f"ALTER PLUGIN {_PLUGIN} 0.1.0 ENABLE", user="guest") + i1.sql(f"ALTER PLUGIN {_PLUGIN} 0.1.0 ENABLE", user=user, password=password) assert e.value.args[:2] == ( "ER_ACCESS_DENIED", - "Plugin system access is denied for user 'guest'", + "Plugin system access is denied for user 'alex'", ) with pytest.raises(TarantoolError) as e: - i1.sql(f"ALTER PLUGIN {_PLUGIN} 0.1.0 DISABLE", user="guest") + i1.sql(f"ALTER PLUGIN {_PLUGIN} 0.1.0 DISABLE", user=user, password=password) assert e.value.args[:2] == ( "ER_ACCESS_DENIED", - "Plugin system access is denied for user 'guest'", + "Plugin system access is denied for user 'alex'", ) with pytest.raises(TarantoolError) as e: - i1.sql(f"DROP PLUGIN {_PLUGIN} 0.1.0", user="guest") + i1.sql(f"DROP PLUGIN {_PLUGIN} 0.1.0", user=user, password=password) assert e.value.args[:2] == ( "ER_ACCESS_DENIED", - "Plugin system access is denied for user 'guest'", + "Plugin system access is denied for user 'alex'", ) diff --git a/test/int/test_sql.py b/test/int/test_sql.py index b1e5e6516f7c80f80dab2c56ff6efc0a7a0aa131..e1abe7c1ca69a43681ab319c6f38c7a999b45737 100644 --- a/test/int/test_sql.py +++ b/test/int/test_sql.py @@ -3961,11 +3961,11 @@ def test_drop_user(cluster: Cluster): password = "Passw0rd" # Create and drop the created user - i1.sql(f""" create user "{user}" with password '{password}' """) + i1.sql(f""" create user "{user}" with password '{password}' using chap-sha1""") i1.sql(f""" drop user "{user}" """) # Create user with privileges - i1.sql(f""" create user "{user}" with password '{password}' """) + i1.sql(f""" create user "{user}" with password '{password}' using chap-sha1""") i1.sql(f""" grant create table to "{user}" """, sudo=True) i1.sql(f""" grant create procedure to "{user}" """, sudo=True) @@ -3973,7 +3973,7 @@ def test_drop_user(cluster: Cluster): i1.sql(f""" drop user "{user}" """) # Create user with privileges - i1.sql(f""" create user "{user}" with password '{password}' """) + i1.sql(f""" create user "{user}" with password '{password}' using chap-sha1""") i1.sql(f""" grant create table to "{user}" """, sudo=True) i1.sql(f""" grant create procedure to "{user}" """, sudo=True) diff --git a/test/pgproto/auth_test.py b/test/pgproto/auth_test.py index 9b95adbb1367caf6289f9ddc1568590323af5804..1b05fd6dc199719935750722340fde10e9b314c1 100644 --- a/test/pgproto/auth_test.py +++ b/test/pgproto/auth_test.py @@ -8,7 +8,7 @@ def test_auth(postgres: Postgres): user = "user" password = "P@ssw0rd" - i1.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5") + i1.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # test successful authentication conn = pg.Connection( @@ -34,7 +34,7 @@ def test_auth(postgres: Postgres): sha_user = "chap-sha-enjoyer" password = "P@ssw0rd" - i1.sql(f"CREATE USER \"{sha_user}\" WITH PASSWORD '{password}' USING md5") + i1.sql(f"CREATE USER \"{sha_user}\" WITH PASSWORD '{password}'") # test authentication with an unsupported method with pytest.raises( @@ -56,7 +56,7 @@ def test_admin_auth(cluster: Cluster): default: instance: pg: - listen: "127.0.0.1:5432" + listen: "127.0.0.1:5442" ssl: False """ ) @@ -72,7 +72,7 @@ def test_admin_auth(cluster: Cluster): with pytest.raises( pg.DatabaseError, match=f"authentication failed for user '{user}'" ): - pg.Connection(user, password="wrong password", host="127.0.0.1", port=5432) + pg.Connection(user, password="wrong password", host="127.0.0.1", port=5442) - conn = pg.Connection(user=user, password=password, host="127.0.0.1", port=5432) + conn = pg.Connection(user=user, password=password, host="127.0.0.1", port=5442) conn.close() diff --git a/test/pgproto/datetime_test.py b/test/pgproto/datetime_test.py index 6ba0d9528068c328124b033ba18ccb16032c505d..a5249826093572b8eda75057f97f4c5d81629c16 100644 --- a/test/pgproto/datetime_test.py +++ b/test/pgproto/datetime_test.py @@ -12,9 +12,7 @@ def setup_psycopg_test_env(postgres: Postgres): port = postgres.port # Create a Postgres user with a compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # Allow the user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) @@ -41,9 +39,7 @@ def setup_pg8000_test_env(postgres: Postgres): password = "P@ssw0rd" # Create a Postgres user with a compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # Allow the user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) diff --git a/test/pgproto/extended_query_test.py b/test/pgproto/extended_query_test.py index 7a49258914e5a9130c36f2c5071aef2b1f5cd303..c4aa709305e4c7092e5834d684bf3e5732837e25 100644 --- a/test/pgproto/extended_query_test.py +++ b/test/pgproto/extended_query_test.py @@ -19,7 +19,7 @@ from psycopg.pq import ExecStatus def test_extended_query(postgres: Postgres): user = "admin" password = "P@ssw0rd" - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") os.environ["PGSSLMODE"] = "disable" conn = pg.Connection( @@ -101,7 +101,7 @@ def test_parameterized_queries(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") conn = psycopg.connect( f"user = {user} password={password} host={host} port={port} sslmode=disable" @@ -173,9 +173,7 @@ def test_params_specified_via_cast(postgres: Postgres): user = "postgres" password = "P@ssw0rd" - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) conn = pg.Connection( @@ -270,7 +268,7 @@ def test_empty_queries(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") conn = psycopg.connect( f"user = {user} password={password} host={host} port={port} sslmode=disable" diff --git a/test/pgproto/pipelining_test.py b/test/pgproto/pipelining_test.py index c21de0d5d54c86a5dc7aa536e88e9c4dd3dd3c4c..45e4c6f8b1da5ef06f75a8d90083f44dcd72a9dc 100644 --- a/test/pgproto/pipelining_test.py +++ b/test/pgproto/pipelining_test.py @@ -9,9 +9,7 @@ def test_pipelined_messages(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) conn = psycopg.connect( f"user = {user} password={password} host={host} port={port} sslmode=disable" @@ -46,9 +44,7 @@ def test_pipelined_messages_with_error(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) conn = psycopg.connect( f"user = {user} password={password} host={host} port={port} sslmode=disable" @@ -86,9 +82,7 @@ def test_pipeline_restores_after_error(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) conn = psycopg.connect( f"user = {user} password={password} host={host} port={port} sslmode=disable" diff --git a/test/pgproto/plugin_test.py b/test/pgproto/plugin_test.py index ef61237e42693bea327d9a3efb6b078a28fd73e5..7ea8910c35227589968c8ff2bc7bf41adddc35de 100644 --- a/test/pgproto/plugin_test.py +++ b/test/pgproto/plugin_test.py @@ -28,7 +28,7 @@ def test_create_plugin(postgres: Postgres): postgres.instance.sql( f""" - ALTER USER "{admin}" WITH PASSWORD '{password}' USING md5 + ALTER USER "{admin}" WITH PASSWORD '{password}' """ ) cur = cursor(postgres, admin, password) @@ -60,7 +60,7 @@ def test_drop_plugin(postgres: Postgres): postgres.instance.sql( f""" - ALTER USER "{admin}" WITH PASSWORD '{password}' USING md5 + ALTER USER "{admin}" WITH PASSWORD '{password}' """ ) cur = cursor(postgres, admin, password) @@ -94,7 +94,7 @@ def test_alter_plugin(postgres: Postgres): postgres.instance.sql( f""" - ALTER USER "{admin}" WITH PASSWORD '{password}' USING md5 + ALTER USER "{admin}" WITH PASSWORD '{password}' """ ) cur = cursor(postgres, admin, password) diff --git a/test/pgproto/psql_session_from_the_guide_test.py b/test/pgproto/psql_session_from_the_guide_test.py index 5b333fcdac2ca76cc5bf33d1cb53c6a382f8130b..fcb2f462c797bb24be8770add1250a412a760601 100644 --- a/test/pgproto/psql_session_from_the_guide_test.py +++ b/test/pgproto/psql_session_from_the_guide_test.py @@ -9,9 +9,7 @@ def test_psql_session_from_the_guide(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # allow user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) diff --git a/test/pgproto/simple_query_test.py b/test/pgproto/simple_query_test.py index b089865cead0a85f2ac05596e818c2e578f25ad3..d083b0b7ef8f8a90c4e07fe9ba9d11f5979d4af1 100644 --- a/test/pgproto/simple_query_test.py +++ b/test/pgproto/simple_query_test.py @@ -10,7 +10,7 @@ from psycopg.pq import ExecStatus def test_simple_query_flow_errors(postgres: Postgres): user = "admin" password = "P@ssw0rd" - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") os.environ["PGSSLMODE"] = "disable" conn = pg.Connection( @@ -37,7 +37,7 @@ def test_simple_query_flow_errors(postgres: Postgres): def test_simple_flow_session(postgres: Postgres): user = "admin" password = "P@ssw0rd" - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") os.environ["PGSSLMODE"] = "disable" conn = pg.Connection( @@ -90,7 +90,7 @@ def test_simple_flow_session(postgres: Postgres): def test_explain(postgres: Postgres): user = "admin" password = "P@ssw0rd" - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") os.environ["PGSSLMODE"] = "disable" conn = pg.Connection( @@ -153,7 +153,7 @@ def test_explain(postgres: Postgres): def test_aggregates(postgres: Postgres): user = "admin" password = "P@ssw0rd" - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") os.environ["PGSSLMODE"] = "disable" conn = pg.Connection( @@ -210,7 +210,7 @@ def test_empty_queries(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") conn = psycopg.connect( f"user = {user} password={password} host={host} port={port} sslmode=disable" diff --git a/test/pgproto/ssl_test.py b/test/pgproto/ssl_test.py index dd1a550f2f84e08b8562665cb77696f3d5896de1..622adabb99ed656f95e7e2f2d83cf3efea19a571 100644 --- a/test/pgproto/ssl_test.py +++ b/test/pgproto/ssl_test.py @@ -9,9 +9,7 @@ import psycopg def test_ssl_refuse(postgres: Postgres): user = "user" password = "P@ssw0rd" - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # disable: only try a non-SSL connection os.environ["PGSSLMODE"] = "disable" @@ -85,7 +83,7 @@ def prepare_with_tls(pg: Postgres, client_tls_pair_name: str): port={port} \ sslmode=require" - instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5") + instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") if client_tls_pair_name != "": ssl_dir = Path(os.path.realpath(__file__)).parent.parent / "ssl_certs" diff --git a/test/pgproto/storage_limits_test.py b/test/pgproto/storage_limits_test.py index d133c584ee773384afb0e4881bc90073c805010a..f8728960353fbe2d6be8603df52bfb05b94fb775 100644 --- a/test/pgproto/storage_limits_test.py +++ b/test/pgproto/storage_limits_test.py @@ -10,9 +10,7 @@ def setup_pg8000_env(postgres: Postgres) -> pg8000.Connection: host = postgres.host port = postgres.port - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) os.environ["PGSSLMODE"] = "disable" diff --git a/test/pgproto/tab_completion_test.py b/test/pgproto/tab_completion_test.py index ba9b23936e2e692ffa0d50f458d8ef2e3494d326..4eec728bed4dd6aed822dcc0f2f63d8d4d1faedb 100644 --- a/test/pgproto/tab_completion_test.py +++ b/test/pgproto/tab_completion_test.py @@ -32,9 +32,7 @@ def test_tab_completion(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # create a table postgres.instance.sql(""" create table "T" ("s" int primary key) """) @@ -90,7 +88,7 @@ def test_completion_query_15_plus(postgres: Postgres): user = "admin" password = "P@ssw0rd" - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") os.environ["PGSSLMODE"] = "disable" conn = psycopg.connect( @@ -124,7 +122,7 @@ def test_completion_query_picodata(postgres: Postgres): user = "admin" password = "P@ssw0rd" - postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}' USING md5") + postgres.instance.sql(f"ALTER USER \"{user}\" WITH PASSWORD '{password}'") os.environ["PGSSLMODE"] = "disable" conn = psycopg.connect( diff --git a/test/pgproto/types_test.py b/test/pgproto/types_test.py index 028bf4a34ac6b322b58eaf09bd42f348ebd688d6..e5c23fbe6cfcbc4d1d0094182bc475395ee56474 100644 --- a/test/pgproto/types_test.py +++ b/test/pgproto/types_test.py @@ -15,9 +15,7 @@ def test_decimal(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # allow user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) @@ -95,9 +93,7 @@ def test_number(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # allow user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) @@ -143,9 +139,7 @@ def test_uuid(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # allow user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) @@ -188,9 +182,7 @@ def test_text_and_varchar(postgres: Postgres): user = "postgres" password = "P@ssw0rd" - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) conn = pg8000.Connection( @@ -227,9 +219,7 @@ def test_unsigned(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # allow user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) @@ -293,9 +283,7 @@ def test_arrays(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT READ ON TABLE "_pico_user" TO "{user}"', sudo=True) @@ -359,9 +347,7 @@ def test_map(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT READ ON TABLE "_pico_table" TO "{user}"', sudo=True) @@ -429,9 +415,7 @@ def test_datetime(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # allow user to create tables postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) @@ -478,9 +462,7 @@ def test_select_from_system_tables(postgres: Postgres): port = postgres.port # create a postgres user using a postgres compatible password - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") # grant read on tables postgres.instance.sql(f'GRANT READ TABLE TO "{user}"', sudo=True) diff --git a/test/pgproto/user_can_read_from_query_cache_test.py b/test/pgproto/user_can_read_from_query_cache_test.py index 23d271fdd19e688c6dad0723fd236f49dac8f59c..bfb5a9b675b559229b872a52a8cf4476070cb0b3 100644 --- a/test/pgproto/user_can_read_from_query_cache_test.py +++ b/test/pgproto/user_can_read_from_query_cache_test.py @@ -9,9 +9,7 @@ def test_user_can_read_from_query_cache(postgres: Postgres): host = postgres.host port = postgres.port - postgres.instance.sql( - f"CREATE USER \"{user}\" WITH PASSWORD '{password}' USING md5" - ) + postgres.instance.sql(f"CREATE USER \"{user}\" WITH PASSWORD '{password}'") postgres.instance.sql(f'GRANT CREATE TABLE TO "{user}"', sudo=True) conn = psycopg.connect( f"user = {user} password={password} host={host} port={port} sslmode=disable"