Add remote server to cloud system health (#55506)

* Add sintun server to cloud system health

* Update name

* Adjust test
pull/55494/head
Joakim Sørensen 2021-09-01 13:23:50 +02:00 committed by GitHub
parent 9284f7b147
commit 33fb080c1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View File

@ -7,10 +7,11 @@
"relayer_connected": "Relayer Connected",
"remote_connected": "Remote Connected",
"remote_enabled": "Remote Enabled",
"remote_server": "Remote Server",
"alexa_enabled": "Alexa Enabled",
"google_enabled": "Google Enabled",
"logged_in": "Logged In",
"subscription_expiration": "Subscription Expiration"
}
}
}
}

View File

@ -33,6 +33,7 @@ async def system_health_info(hass):
data["remote_connected"] = cloud.remote.is_connected
data["alexa_enabled"] = client.prefs.alexa_enabled
data["google_enabled"] = client.prefs.google_enabled
data["remote_server"] = cloud.remote.snitun_server
data["can_reach_cert_server"] = system_health.async_check_can_reach_url(
hass, cloud.acme_directory_server

View File

@ -7,6 +7,7 @@
"can_reach_cloud_auth": "Reach Authentication Server",
"google_enabled": "Google Enabled",
"logged_in": "Logged In",
"remote_server": "Remote Server",
"relayer_connected": "Relayer Connected",
"remote_connected": "Remote Connected",
"remote_enabled": "Remote Enabled",

View File

@ -28,7 +28,7 @@ async def test_cloud_system_health(hass, aioclient_mock):
relayer="wss://cloud.bla.com/websocket_api",
acme_directory_server="https://cert-server",
is_logged_in=True,
remote=Mock(is_connected=False),
remote=Mock(is_connected=False, snitun_server="us-west-1"),
expiration_date=now,
is_connected=True,
client=Mock(
@ -52,6 +52,7 @@ async def test_cloud_system_health(hass, aioclient_mock):
"relayer_connected": True,
"remote_enabled": True,
"remote_connected": False,
"remote_server": "us-west-1",
"alexa_enabled": True,
"google_enabled": False,
"can_reach_cert_server": "ok",