mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-09 10:59:43 +00:00
Add JobManager and Job decorator (#2225)
* Adds condition decorator to block execution that require internet * Fix exsisting tests * Add internet state to network info * Add healthy condition * Add tests * It's all changed * rename
This commit is contained in:
@@ -13,6 +13,7 @@ from supervisor.bootstrap import initialize_coresys
|
||||
from supervisor.coresys import CoreSys
|
||||
from supervisor.dbus.network import NetworkManager
|
||||
from supervisor.docker import DockerAPI
|
||||
from supervisor.host.const import ConnectivityState
|
||||
from supervisor.utils.gdbus import DBus
|
||||
|
||||
from tests.common import exists_fixture, load_fixture, load_json_fixture
|
||||
@@ -136,6 +137,10 @@ async def coresys(loop, docker, network_manager, aiohttp_client) -> CoreSys:
|
||||
# Mock docker
|
||||
coresys_obj._docker = docker
|
||||
|
||||
# Set internet state
|
||||
coresys_obj.supervisor._connectivity = True
|
||||
coresys_obj.host.network._connectivity = ConnectivityState.FULL
|
||||
|
||||
yield coresys_obj
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user