From 440379680e68d62243c147504556de981cae329a Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 27 Feb 2023 22:07:37 +0100 Subject: [PATCH] Fix CI Supervisor version for tests (#4144) * Install dbus applications for CI tests * Update const.py * fix tests * Fix test references to DEV version * sudo apt-get * Update builder.yml --------- Co-authored-by: Mike Degatano --- supervisor/const.py | 2 +- tests/api/test_root.py | 2 +- tests/backups/conftest.py | 4 ++-- tests/test_coresys.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/supervisor/const.py b/supervisor/const.py index fb20043e4..f831b4e56 100644 --- a/supervisor/const.py +++ b/supervisor/const.py @@ -6,7 +6,7 @@ from sys import version_info as systemversion from aiohttp import __version__ as aiohttpversion -SUPERVISOR_VERSION = "DEV" +SUPERVISOR_VERSION = "99.9.9dev" SERVER_SOFTWARE = f"HomeAssistantSupervisor/{SUPERVISOR_VERSION} aiohttp/{aiohttpversion} Python/{systemversion[0]}.{systemversion[1]}" URL_HASSIO_ADDONS = "https://github.com/home-assistant/addons" diff --git a/tests/api/test_root.py b/tests/api/test_root.py index d66bb8009..f726935c9 100644 --- a/tests/api/test_root.py +++ b/tests/api/test_root.py @@ -16,7 +16,7 @@ async def test_api_info(api_client): resp = await api_client.get("/info") result = await resp.json() - assert result["data"]["supervisor"] == "DEV" + assert result["data"]["supervisor"] == "99.9.9dev" assert result["data"]["docker"] == "1.0.0" assert result["data"]["supported"] is True assert result["data"]["channel"] == "stable" diff --git a/tests/backups/conftest.py b/tests/backups/conftest.py index a7f680c08..a3d1f1644 100644 --- a/tests/backups/conftest.py +++ b/tests/backups/conftest.py @@ -36,7 +36,7 @@ def partial_backup_mock(backup_mock): backup_instance.sys_type = BackupType.PARTIAL backup_instance.folders = [] backup_instance.addon_list = [TEST_ADDON_SLUG] - backup_instance.supervisor_version = "DEV" + backup_instance.supervisor_version = "99.9.9dev" yield backup_mock @@ -47,5 +47,5 @@ def full_backup_mock(backup_mock): backup_instance.sys_type = BackupType.FULL backup_instance.folders = ALL_FOLDERS backup_instance.addon_list = [TEST_ADDON_SLUG] - backup_instance.supervisor_version = "DEV" + backup_instance.supervisor_version = "99.9.9dev" yield backup_mock diff --git a/tests/test_coresys.py b/tests/test_coresys.py index 8e4e898c3..7e76a4330 100644 --- a/tests/test_coresys.py +++ b/tests/test_coresys.py @@ -36,7 +36,7 @@ def test_now(coresys: CoreSys): def test_custom_user_agent(coresys: CoreSys): """Test custom useragent.""" assert ( - "HomeAssistantSupervisor/DEV" + "HomeAssistantSupervisor/99.9.9dev" in coresys.websession._default_headers[ # pylint: disable=protected-access USER_AGENT ]