request = <SubRequest 'swh_storage_postgresql' for <Function test_access_to_another_user_collection_is_forbidden>>
@pytest.fixture
def postgresql_factory(request):
"""
Fixture factory for PostgreSQL.
:param FixtureRequest request: fixture request object
:rtype: psycopg2.connection
:returns: postgresql client
"""
config = factories.get_config(request)
if not psycopg2:
raise ImportError("No module named psycopg2. Please install it.")
proc_fixture = request.getfixturevalue(process_fixture_name)
# _, config = try_import('psycopg2', request)
pg_host = proc_fixture.host
pg_port = proc_fixture.port
pg_user = proc_fixture.user
pg_options = proc_fixture.options
pg_db = db_name or config["dbname"]
with SwhDatabaseJanitor(
pg_user,
pg_host,
pg_port,
pg_db,
proc_fixture.version,
> dump_files=dump_files,
):
.tox/py3/lib/python3.7/site-packages/swh/storage/pytest_plugin.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/pytest_postgresql/janitor.py:91: in __enter__
self.init()
.tox/py3/lib/python3.7/site-packages/swh/storage/pytest_plugin.py:174: in init
self.db_setup()
.tox/py3/lib/python3.7/site-packages/swh/storage/pytest_plugin.py:129: in db_setup
fname,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (['psql', '--quiet', '--no-psqlrc', '-v', 'ON_ERROR_STOP=1', '-d', ...],)
kwargs = {}, retcode = 3
cmd = ['psql', '--quiet', '--no-psqlrc', '-v', 'ON_ERROR_STOP=1', '-d', ...]
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '['psql', '--quiet', '--no-psqlrc', '-v', 'ON_ERROR_STOP=1', '-d', 'host=127.0.0.1 user=postgres port=23465 dbname=storage', '-f', '/var/lib/jenkins/workspace/DDEP/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/storage/sql/20-swh-enums.sql']' returned non-zero exit status 3.
/usr/lib/python3.7/subprocess.py:347: CalledProcessError
TEST RESULT
TEST RESULT
- Run At
- Sep 24 2020, 5:10 PM