mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-09 10:16:29 +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:
parent
6ab4dda5e8
commit
bb474a5c14
@ -51,7 +51,7 @@ class EvaluateContainer(EvaluateBase):
|
|||||||
@property
|
@property
|
||||||
def states(self) -> list[CoreState]:
|
def states(self) -> list[CoreState]:
|
||||||
"""Return a list of valid states when this evaluation can run."""
|
"""Return a list of valid states when this evaluation can run."""
|
||||||
return [CoreState.SETUP, CoreState.RUNNING, CoreState.INITIALIZE]
|
return [CoreState.RUNNING]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def known_images(self) -> set[str]:
|
def known_images(self) -> set[str]:
|
||||||
|
@ -41,9 +41,6 @@ async def test_evaluation_setup(coresys: CoreSys):
|
|||||||
"supervisor.resolution.evaluations.operating_system.EvaluateOperatingSystem.evaluate",
|
"supervisor.resolution.evaluations.operating_system.EvaluateOperatingSystem.evaluate",
|
||||||
return_value=False,
|
return_value=False,
|
||||||
) as operating_system, patch(
|
) as operating_system, patch(
|
||||||
"supervisor.resolution.evaluations.container.EvaluateContainer.evaluate",
|
|
||||||
return_value=False,
|
|
||||||
) as container, patch(
|
|
||||||
"supervisor.resolution.evaluations.network_manager.EvaluateNetworkManager.evaluate",
|
"supervisor.resolution.evaluations.network_manager.EvaluateNetworkManager.evaluate",
|
||||||
return_value=False,
|
return_value=False,
|
||||||
) as network_manager, patch(
|
) as network_manager, patch(
|
||||||
@ -52,7 +49,6 @@ async def test_evaluation_setup(coresys: CoreSys):
|
|||||||
) as systemd:
|
) as systemd:
|
||||||
await coresys.resolution.evaluate.evaluate_system()
|
await coresys.resolution.evaluate.evaluate_system()
|
||||||
operating_system.assert_called_once()
|
operating_system.assert_called_once()
|
||||||
container.assert_called_once()
|
|
||||||
network_manager.assert_called_once()
|
network_manager.assert_called_once()
|
||||||
systemd.assert_called_once()
|
systemd.assert_called_once()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user