1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-02-14 23:18:57 +00:00

Fix CI tests failing after addons to apps rename in CLI (#4525)

The tests are now failing because the deprecation warning is parsed by the
helper function as well. Use the new commands/flags to silence the warning.
This commit is contained in:
Jan Čermák
2026-02-11 18:55:04 +01:00
committed by GitHub
parent 952191a058
commit 5e9929182c

View File

@@ -97,23 +97,23 @@ def test_supervisor_is_updated(shell_json):
@pytest.mark.dependency(depends=["test_supervisor_is_updated"]) @pytest.mark.dependency(depends=["test_supervisor_is_updated"])
def test_addon_install(shell_json): def test_app_install(shell_json):
# install Core SSH add-on # install Core SSH app
assert ( assert (
shell_json("ha addons install core_ssh --no-progress --raw-json").get("result") == "ok" shell_json("ha apps install core_ssh --no-progress --raw-json").get("result") == "ok"
), "Core SSH add-on install failed" ), "Core SSH app install failed"
# check Core SSH add-on is installed # check Core SSH app is installed
assert ( assert (
shell_json("ha addons info core_ssh --no-progress --raw-json").get("data", {}).get("version") is not None shell_json("ha apps info core_ssh --no-progress --raw-json").get("data", {}).get("version") is not None
), "Core SSH add-on not installed" ), "Core SSH app not installed"
# start Core SSH add-on # start Core SSH app
assert ( assert (
shell_json("ha addons start core_ssh --no-progress --raw-json").get("result") == "ok" shell_json("ha apps start core_ssh --no-progress --raw-json").get("result") == "ok"
), "Core SSH add-on start failed" ), "Core SSH app start failed"
# check Core SSH add-on is running # check Core SSH app is running
ssh_info = shell_json("ha addons info core_ssh --no-progress --raw-json") ssh_info = shell_json("ha apps info core_ssh --no-progress --raw-json")
assert ssh_info.get("data", {}).get("state") == "started", "Core SSH add-on not running" assert ssh_info.get("data", {}).get("state") == "started", "Core SSH app not running"
logger.info("Core SSH add-on info: %s", ssh_info) logger.info("Core SSH app info: %s", ssh_info)
@pytest.mark.dependency(depends=["test_supervisor_is_updated"]) @pytest.mark.dependency(depends=["test_supervisor_is_updated"])
@@ -143,11 +143,11 @@ def test_create_backup(shell_json, stash):
logger.info("Backup creation result: %s", result) logger.info("Backup creation result: %s", result)
@pytest.mark.dependency(depends=["test_addon_install"]) @pytest.mark.dependency(depends=["test_app_install"])
def test_addon_uninstall(shell_json): def test_app_uninstall(shell_json):
result = shell_json("ha addons uninstall core_ssh --no-progress --raw-json") result = shell_json("ha apps uninstall core_ssh --no-progress --raw-json")
assert result.get("result") == "ok", f"Core SSH add-on uninstall failed: {result}" assert result.get("result") == "ok", f"Core SSH app uninstall failed: {result}"
logger.info("Core SSH add-on uninstall result: %s", result) logger.info("Core SSH app uninstall result: %s", result)
@pytest.mark.dependency(depends=["test_supervisor_is_updated"]) @pytest.mark.dependency(depends=["test_supervisor_is_updated"])
@@ -173,14 +173,14 @@ def test_restart_supervisor(shell, shell_json):
@pytest.mark.dependency(depends=["test_create_backup"]) @pytest.mark.dependency(depends=["test_create_backup"])
def test_restore_backup(shell_json, stash): def test_restore_backup(shell_json, stash):
result = shell_json(f"ha backups restore {stash.get('slug')} --addons core_ssh --no-progress --raw-json") result = shell_json(f"ha backups restore {stash.get('slug')} --app core_ssh --no-progress --raw-json")
assert result.get("result") == "ok", f"Backup restore failed: {result}" assert result.get("result") == "ok", f"Backup restore failed: {result}"
logger.info("Backup restore result: %s", result) logger.info("Backup restore result: %s", result)
addon_info = shell_json("ha addons info core_ssh --no-progress --raw-json") app_info = shell_json("ha apps info core_ssh --no-progress --raw-json")
assert addon_info.get("data", {}).get("version") is not None, "Core SSH add-on not installed" assert app_info.get("data", {}).get("version") is not None, "Core SSH app not installed"
assert addon_info.get("data", {}).get("state") == "started", "Core SSH add-on not running" assert app_info.get("data", {}).get("state") == "started", "Core SSH app not running"
logger.info("Core SSH add-on info: %s", addon_info) logger.info("Core SSH app info: %s", app_info)
@pytest.mark.dependency(depends=["test_create_backup"]) @pytest.mark.dependency(depends=["test_create_backup"])