mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-20 10:28:45 +00:00
Sentry only loaded when diagnostics on (#3993)
* Sentry only loaded when diagnostics on * Logging when sentry is closed
This commit is contained in:
@@ -206,3 +206,17 @@ async def test_attach_total_failure(coresys: CoreSys):
|
||||
DockerError
|
||||
):
|
||||
await coresys.homeassistant.core.instance.attach(AwesomeVersion("2022.7.3"))
|
||||
|
||||
|
||||
@pytest.mark.parametrize("err", [DockerException(), RequestException()])
|
||||
async def test_image_pull_fail(
|
||||
coresys: CoreSys, capture_exception: Mock, err: Exception
|
||||
):
|
||||
"""Test failure to pull image."""
|
||||
coresys.docker.images.pull.side_effect = err
|
||||
with pytest.raises(DockerError):
|
||||
await coresys.homeassistant.core.instance.install(
|
||||
AwesomeVersion("2022.7.3"), arch=CpuArch.AMD64
|
||||
)
|
||||
|
||||
capture_exception.assert_called_once_with(err)
|
||||
|
||||
Reference in New Issue
Block a user