request = <SubRequest '_push_request_context' for <Function test_add_empty>>
@pytest.fixture(autouse=True)
def _push_request_context(request: pytest.FixtureRequest):
"""During tests execution request context has been pushed, e.g. `url_for`,
`session`, etc. can be used in tests as is::
def test_app(app, client):
assert client.get(url_for('myview')).status_code == 200
"""
if "app" not in request.fixturenames:
return
> app = request.getfixturevalue("app")
.tox/py3/lib/python3.7/site-packages/swh/core/pytest_plugin.py:325:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/pytest_postgresql/factories/client.py:60: in postgresql_factory
process_fixture_name
.tox/py3/lib/python3.7/site-packages/pytest_postgresql/factories/process.py:156: in postgresql_proc_fixture
janitor.load(load_element)
.tox/py3/lib/python3.7/site-packages/pytest_postgresql/janitor.py:129: in load
password=self.password,
.tox/py3/lib/python3.7/site-packages/deprecated/classic.py:285: in wrapper_function
return wrapped_(*args_, **kwargs_)
.tox/py3/lib/python3.7/site-packages/swh/core/db/db_utils.py:569: in initialize_database_for_module
populate_database_for_package(modname, conninfo, flavor)
.tox/py3/lib/python3.7/site-packages/swh/core/db/db_utils.py:541: in populate_database_for_package
execute_sqlfiles(sqlfiles, conninfo, flavor)
.tox/py3/lib/python3.7/site-packages/swh/core/db/db_utils.py:677: in execute_sqlfiles
subprocess.check_call(psql_command + ["-f", str(sqlfile)])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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', 'user=postgres password=xxx dbname=tests_tmpl host=127.0.0.1 port=30220', '-f', '/var/lib/jenkins/workspace/DCIDX/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/indexer/sql/60-indexes.sql']' returned non-zero exit status 3.
/usr/lib/python3.7/subprocess.py:347: CalledProcessError
TEST RESULT
TEST RESULT
- Run At
- Nov 28 2022, 12:38 PM