Skip to content
Snippets Groups Projects

db: Grant read access to guest user on all tables of the schema

Compare and
2 files
+ 22
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -7,7 +7,9 @@ import os
from click.testing import CliRunner
from hypothesis import HealthCheck
import psycopg2
import pytest
from pytest_postgresql import factories
from swh.core.db.db_utils import import_swhmodule
@@ -21,6 +23,17 @@ function_scoped_fixture_check = (
)
def create_role_guest(**kwargs):
with psycopg2.connect(**kwargs) as conn:
with conn.cursor() as cur:
cur.execute("CREATE ROLE guest LOGIN PASSWORD 'guest'")
postgresql_proc = factories.postgresql_proc(
load=[create_role_guest],
)
@pytest.fixture
def cli_runner():
return CliRunner()
Loading