From efef915fc7ec5a687752010407d337419cd39dd5 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 13 Feb 2023 23:28:39 +0100 Subject: [PATCH] Add mariadb 10.3.32 to database tests (#87741) Co-authored-by: J. Nick Koston --- .github/workflows/ci.yaml | 4 +++- tests/components/recorder/test_purge.py | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d3438f0ccf2..b3ae1c1f907 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,11 +34,13 @@ env: HA_SHORT_VERSION: 2023.3 DEFAULT_PYTHON: "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.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.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']" PRE_COMMIT_CACHE: ~/.cache/pre-commit PIP_CACHE: /tmp/pip-cache diff --git a/tests/components/recorder/test_purge.py b/tests/components/recorder/test_purge.py index b58189c04c7..06aba7399a2 100644 --- a/tests/components/recorder/test_purge.py +++ b/tests/components/recorder/test_purge.py @@ -1552,9 +1552,7 @@ async def test_purge_many_old_events( with session_scope(hass=hass) as session: 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 event_datas.count() == 5 purge_before = dt_util.utcnow() - timedelta(days=4) @@ -1568,7 +1566,6 @@ async def test_purge_many_old_events( ) assert not finished assert events.count() == MAX_ROWS_TO_PURGE * 3 - assert event_datas.count() == 5 # we should only have 2 groups of events left finished = purge_old_data( @@ -1580,7 +1577,6 @@ async def test_purge_many_old_events( ) assert finished assert events.count() == MAX_ROWS_TO_PURGE * 2 - assert event_datas.count() == 5 # we should now purge everything finished = purge_old_data( @@ -1592,7 +1588,6 @@ async def test_purge_many_old_events( ) assert finished assert events.count() == 0 - assert event_datas.count() == 0 async def test_purge_can_mix_legacy_and_new_format(