Add mariadb 10.3.32 to database tests (#87741)
Co-authored-by: J. Nick Koston <nick@koston.org>pull/88041/head^2
parent
d8ec259e9a
commit
efef915fc7
|
@ -34,11 +34,13 @@ env:
|
||||||
HA_SHORT_VERSION: 2023.3
|
HA_SHORT_VERSION: 2023.3
|
||||||
DEFAULT_PYTHON: "3.10"
|
DEFAULT_PYTHON: "3.10"
|
||||||
ALL_PYTHON_VERSIONS: "['3.10']"
|
ALL_PYTHON_VERSIONS: "['3.10']"
|
||||||
|
# 10.3 is the oldest supported version
|
||||||
|
# - 10.3.32 is the version currently shipped with Synology (as of 17 Feb 2022)
|
||||||
# 10.6 is the current long-term-support
|
# 10.6 is the current long-term-support
|
||||||
# - 10.6.10 is the version currently shipped with the Add-on (as of 31 Jan 2023)
|
# - 10.6.10 is the version currently shipped with the Add-on (as of 31 Jan 2023)
|
||||||
# 10.10 is the latest short-term-support
|
# 10.10 is the latest short-term-support
|
||||||
# - 10.10.3 is the latest (as of 6 Feb 2023)
|
# - 10.10.3 is the latest (as of 6 Feb 2023)
|
||||||
MARIADB_VERSIONS: "['mariadb:10.6.10','mariadb:10.10.3']"
|
MARIADB_VERSIONS: "['mariadb:10.3.32','mariadb:10.6.10','mariadb:10.10.3']"
|
||||||
POSTGRESQL_VERSIONS: "['postgres:15.0']"
|
POSTGRESQL_VERSIONS: "['postgres:15.0']"
|
||||||
PRE_COMMIT_CACHE: ~/.cache/pre-commit
|
PRE_COMMIT_CACHE: ~/.cache/pre-commit
|
||||||
PIP_CACHE: /tmp/pip-cache
|
PIP_CACHE: /tmp/pip-cache
|
||||||
|
|
|
@ -1552,9 +1552,7 @@ async def test_purge_many_old_events(
|
||||||
|
|
||||||
with session_scope(hass=hass) as session:
|
with session_scope(hass=hass) as session:
|
||||||
events = session.query(Events).filter(Events.event_type.like("EVENT_TEST%"))
|
events = session.query(Events).filter(Events.event_type.like("EVENT_TEST%"))
|
||||||
event_datas = session.query(EventData)
|
|
||||||
assert events.count() == MAX_ROWS_TO_PURGE * 6
|
assert events.count() == MAX_ROWS_TO_PURGE * 6
|
||||||
assert event_datas.count() == 5
|
|
||||||
|
|
||||||
purge_before = dt_util.utcnow() - timedelta(days=4)
|
purge_before = dt_util.utcnow() - timedelta(days=4)
|
||||||
|
|
||||||
|
@ -1568,7 +1566,6 @@ async def test_purge_many_old_events(
|
||||||
)
|
)
|
||||||
assert not finished
|
assert not finished
|
||||||
assert events.count() == MAX_ROWS_TO_PURGE * 3
|
assert events.count() == MAX_ROWS_TO_PURGE * 3
|
||||||
assert event_datas.count() == 5
|
|
||||||
|
|
||||||
# we should only have 2 groups of events left
|
# we should only have 2 groups of events left
|
||||||
finished = purge_old_data(
|
finished = purge_old_data(
|
||||||
|
@ -1580,7 +1577,6 @@ async def test_purge_many_old_events(
|
||||||
)
|
)
|
||||||
assert finished
|
assert finished
|
||||||
assert events.count() == MAX_ROWS_TO_PURGE * 2
|
assert events.count() == MAX_ROWS_TO_PURGE * 2
|
||||||
assert event_datas.count() == 5
|
|
||||||
|
|
||||||
# we should now purge everything
|
# we should now purge everything
|
||||||
finished = purge_old_data(
|
finished = purge_old_data(
|
||||||
|
@ -1592,7 +1588,6 @@ async def test_purge_many_old_events(
|
||||||
)
|
)
|
||||||
assert finished
|
assert finished
|
||||||
assert events.count() == 0
|
assert events.count() == 0
|
||||||
assert event_datas.count() == 0
|
|
||||||
|
|
||||||
|
|
||||||
async def test_purge_can_mix_legacy_and_new_format(
|
async def test_purge_can_mix_legacy_and_new_format(
|
||||||
|
|
Loading…
Reference in New Issue