1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add CI job which runs recorder tests on MariaDB (#80586)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Erik Montnemery
2022-10-19 13:04:28 +02:00
committed by GitHub
parent c4bbc439a5
commit f4951a4f31
9 changed files with 250 additions and 26 deletions

View File

@@ -925,11 +925,11 @@ def assert_setup_component(count, domain=None):
SetupRecorderInstanceT = Callable[..., Awaitable[recorder.Recorder]]
def init_recorder_component(hass, add_config=None):
def init_recorder_component(hass, add_config=None, db_url="sqlite://"):
"""Initialize the recorder."""
config = dict(add_config) if add_config else {}
if recorder.CONF_DB_URL not in config:
config[recorder.CONF_DB_URL] = "sqlite://" # In memory DB
config[recorder.CONF_DB_URL] = db_url
if recorder.CONF_COMMIT_INTERVAL not in config:
config[recorder.CONF_COMMIT_INTERVAL] = 0