Delay initial version fetch until there is connectivity (#5603)

* Delay inital version fetch until there is connectivity

* Add test

* Only mock get not whole websession object

* drive delayed fetch off of supervisor connectivity not host

* Fix test to not rely on sleep guessing to track tasks

* Use fixture to remove job throttle temporarily
This commit is contained in:
Mike Degatano
2025-02-11 07:22:33 -05:00
committed by GitHub
parent fa6949f4e4
commit 52cc17fa3f
13 changed files with 121 additions and 36 deletions

View File

@@ -3,6 +3,7 @@
from unittest.mock import PropertyMock, patch
from awesomeversion import AwesomeVersion
import pytest
from supervisor.coresys import CoreSys
from supervisor.docker.interface import DockerInterface
@@ -35,6 +36,7 @@ async def test_repair(coresys: CoreSys):
assert install.call_count == len(coresys.plugins.all_plugins)
@pytest.mark.usefixtures("no_job_throttle")
async def test_load(coresys: CoreSys):
"""Test plugin manager load."""
coresys.hardware.disk.get_disk_free_space = lambda x: 5000