mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-02-02 02:40:42 +01:00
Release 0.17.1; extended XML output on db initialization error
This commit is contained in:
parent
211aca9d13
commit
1e322f226a
@ -4,6 +4,12 @@ Changelog
|
|||||||
|
|
||||||
.. currentmodule:: firebird.qa.plugin
|
.. currentmodule:: firebird.qa.plugin
|
||||||
|
|
||||||
|
Version 0.17.1
|
||||||
|
==============
|
||||||
|
|
||||||
|
* When database initialization script fails, the XML output is extended with `dbinit-stderr`
|
||||||
|
property that contains `stderr` output with errors reported by ISQL.
|
||||||
|
|
||||||
Version 0.17.0
|
Version 0.17.0
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
@ -23,10 +23,10 @@ copyright = '2022, Pavel Cisar'
|
|||||||
author = 'Pavel Císař'
|
author = 'Pavel Císař'
|
||||||
|
|
||||||
# The short X.Y version
|
# The short X.Y version
|
||||||
version = '0.17.0'
|
version = '0.17.1'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = '0.17.0'
|
release = '0.17.1'
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
@ -58,7 +58,7 @@ from threading import Thread, Barrier
|
|||||||
from firebird.driver import connect, connect_server, create_database, driver_config, \
|
from firebird.driver import connect, connect_server, create_database, driver_config, \
|
||||||
NetProtocol, Server, CHARSET_MAP, Connection, Cursor, \
|
NetProtocol, Server, CHARSET_MAP, Connection, Cursor, \
|
||||||
DESCRIPTION_NAME, DESCRIPTION_DISPLAY_SIZE, DatabaseConfig, DBKeyScope, DbInfoCode, \
|
DESCRIPTION_NAME, DESCRIPTION_DISPLAY_SIZE, DatabaseConfig, DBKeyScope, DbInfoCode, \
|
||||||
DbWriteMode, get_api
|
DbWriteMode, get_api, Error
|
||||||
from firebird.driver.core import _connect_helper
|
from firebird.driver.core import _connect_helper
|
||||||
|
|
||||||
Substitutions = List[Tuple[str, str]]
|
Substitutions = List[Tuple[str, str]]
|
||||||
@ -674,7 +674,7 @@ class Database:
|
|||||||
print(result.stdout)
|
print(result.stdout)
|
||||||
print(f"-- stderr {'-' * 20}")
|
print(f"-- stderr {'-' * 20}")
|
||||||
print(result.stderr)
|
print(result.stderr)
|
||||||
raise Exception("Database init script execution failed")
|
raise Error("Database init script execution failed", stderr=result.stderr)
|
||||||
return result
|
return result
|
||||||
def drop(self) -> None:
|
def drop(self) -> None:
|
||||||
"""Drop the test database.
|
"""Drop the test database.
|
||||||
@ -804,7 +804,12 @@ def db_factory(*, filename: str='test.fdb', init: Optional[str]=None,
|
|||||||
if async_write:
|
if async_write:
|
||||||
db.set_async_write()
|
db.set_async_write()
|
||||||
if init: # Do not check for None, we want to skip empty scripts as well
|
if init: # Do not check for None, we want to skip empty scripts as well
|
||||||
db.init(init)
|
try:
|
||||||
|
db.init(init)
|
||||||
|
except Error as exc:
|
||||||
|
if hasattr(exc, 'stderr'):
|
||||||
|
request.node.user_properties.append(("dbinit-stderr", exc.stderr))
|
||||||
|
raise
|
||||||
yield db
|
yield db
|
||||||
if not do_not_drop:
|
if not do_not_drop:
|
||||||
db.drop()
|
db.drop()
|
||||||
|
@ -5,7 +5,7 @@ all-files=True
|
|||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
name = firebird-qa
|
name = firebird-qa
|
||||||
version = 0.17.0
|
version = 0.17.1
|
||||||
description = pytest plugin for Firebird QA
|
description = pytest plugin for Firebird QA
|
||||||
long_description = file: README.rst
|
long_description = file: README.rst
|
||||||
long_description_content_type = text/x-rst; charset=UTF-8
|
long_description_content_type = text/x-rst; charset=UTF-8
|
||||||
|
Loading…
Reference in New Issue
Block a user