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 <michael.degatano@gmail.com>
This commit is contained in:
Pascal Vizeli 2023-02-27 22:07:37 +01:00 committed by GitHub
parent 165af46f54
commit 440379680e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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
]