Page MenuHomeSoftware Heritage

Jenkins > .tox.py3-core-db-server-slow-cover.lib.python3.7.site-packages.swh.core.db.tests.test_db_utils::test_db_utils_versions[test.cli_new]
Failed

TEST RESULT

Run At
Feb 2 2022, 1:53 PM
Details
cli_runner = <click.testing.CliRunner object at 0x7f29564cd320> postgresql = <connection object at 0x7f295694d408; dsn: 'user=postgres password=xxx dbname=tests host=127.0.0.1 port=11931 options=''', closed: 0> mock_package_sql = <function mock_package_sql.<locals>.get_sql_for_package_mock at 0x7f295692bd08> module = 'test.cli_new' @pytest.mark.parametrize("module", ["test.cli", "test.cli_new"]) def test_db_utils_versions(cli_runner, postgresql, mock_package_sql, module): """Check get_database_info, swh_db_versions and swh_db_module work ok This test test both a db with "new style" set of sql init scripts (i.e. the dbversion table is not created in these scripts, but by the populate_database_for_package() function directly, via the 'swh db init' command) and an "old style" set (dbversion created in the scripts)S. """ conninfo = craft_conninfo(postgresql) result = cli_runner.invoke(swhdb, ["init-admin", module, "--dbname", conninfo]) assert result.exit_code == 0, f"Unexpected output: {result.output}" result = cli_runner.invoke(swhdb, ["init", module, "--dbname", conninfo]) > assert result.exit_code == 0, f"Unexpected output: {result.output}" E AssertionError: Unexpected output: E assert 1 == 0 E +1 E -0 .tox/py3-core-db-server-slow-cover/lib/python3.7/site-packages/swh/core/db/tests/test_db_utils.py:25: AssertionError