1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 14:08:21 +00:00

Add certificate status for cloud remote (#91277)

This commit is contained in:
Joakim Sørensen
2023-04-13 00:38:32 +02:00
committed by GitHub
parent d6c954a909
commit 2c8b704a6d
5 changed files with 11 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import asyncio
from unittest.mock import Mock
from aiohttp import ClientError
from hass_nabucasa.remote import CertificateStatus
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
@@ -32,7 +33,11 @@ async def test_cloud_system_health(
relayer_server="cloud.bla.com",
acme_server="cert-server",
is_logged_in=True,
remote=Mock(is_connected=False, snitun_server="us-west-1"),
remote=Mock(
is_connected=False,
snitun_server="us-west-1",
certificate_status=CertificateStatus.READY,
),
expiration_date=now,
is_connected=True,
client=Mock(
@@ -54,6 +59,7 @@ async def test_cloud_system_health(
assert info == {
"logged_in": True,
"subscription_expiration": now,
"certificate_status": "ready",
"relayer_connected": True,
"relayer_region": "xx-earth-616",
"remote_enabled": True,