1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Only run container evaluation when system is running (#3239)

* Only run container evaluation when system is running

* adjust test
This commit is contained in:
Joakim Sørensen
2021-10-18 20:25:50 +02:00
committed by GitHub
parent 6ab4dda5e8
commit bb474a5c14
2 changed files with 1 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ class EvaluateContainer(EvaluateBase):
@property
def states(self) -> list[CoreState]:
"""Return a list of valid states when this evaluation can run."""
return [CoreState.SETUP, CoreState.RUNNING, CoreState.INITIALIZE]
return [CoreState.RUNNING]
@property
def known_images(self) -> set[str]:

View File

@@ -41,9 +41,6 @@ async def test_evaluation_setup(coresys: CoreSys):
"supervisor.resolution.evaluations.operating_system.EvaluateOperatingSystem.evaluate",
return_value=False,
) as operating_system, patch(
"supervisor.resolution.evaluations.container.EvaluateContainer.evaluate",
return_value=False,
) as container, patch(
"supervisor.resolution.evaluations.network_manager.EvaluateNetworkManager.evaluate",
return_value=False,
) as network_manager, patch(
@@ -52,7 +49,6 @@ async def test_evaluation_setup(coresys: CoreSys):
) as systemd:
await coresys.resolution.evaluate.evaluate_system()
operating_system.assert_called_once()
container.assert_called_once()
network_manager.assert_called_once()
systemd.assert_called_once()