Make the frontend available sooner (Part 1 of 2) (#36263)
* Part 1 of 2 (no breaking changes in part 1). When integrations configured via the UI block startup or fail to start, the webserver can remain offline which make it is impossible to recover without manually changing files in .storage since the UI is not available. This change is the foundation that part 2 will build on and enable a listener to start the webserver when the frontend is finished loading. Frontend Changes (home-assistant/frontend#6068) * Address review comments * bump timeout to 1800s, adjust comment * bump timeout to 4h * remove timeout failsafe * and the test
This commit is contained in:
1 parent
7338feb659
commit
578d4a9b6a
13 files changed
+126
-62
No files matched your search
+4
-1
@@ -35,7 +35,7 @@ from homeassistant.exceptions import InvalidEntityFormatError, InvalidStateError
|
||||
import homeassistant.util.dt as dt_util
|
||||
from homeassistant.util.unit_system import METRIC_SYSTEM
|
||||
|
||||
from tests.async_mock import MagicMock, Mock, patch
|
||||
from tests.async_mock import MagicMock, Mock, PropertyMock, patch
|
||||
from tests.common import async_mock_service, get_test_home_assistant
|
||||
|
||||
PST = pytz.timezone("America/Los_Angeles")
|
||||
@@ -901,6 +901,8 @@ class TestConfig(unittest.TestCase):
|
||||
def test_as_dict(self):
|
||||
"""Test as dict."""
|
||||
self.config.config_dir = "/test/ha-config"
|
||||
self.config.hass = MagicMock()
|
||||
type(self.config.hass.state).value = PropertyMock(return_value="RUNNING")
|
||||
expected = {
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
@@ -914,6 +916,7 @@ class TestConfig(unittest.TestCase):
|
||||
"version": __version__,
|
||||
"config_source": "default",
|
||||
"safe_mode": False,
|
||||
"state": "RUNNING",
|
||||
"external_url": None,
|
||||
"internal_url": None,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user