core/tests/helpers
J. Nick Koston 01e66d6fb2
Improve handling of unrecoverable storage corruption (#96712)
* Improve handling of unrecoverable storage corruption

fixes #96574

If something in storage gets corrupted core can boot loop
or if its integration specific, the integration will fail to
start.

We now complainly loudly in the log, move away the corrupt data
and start fresh to allow startup to proceed so the user can
get to the UI and restore from backup without having to attach
a console (or otherwise login to the OS and manually modify files).

* test for corruption

* ensure OSError is still fatal

* one more case

* create an issue for corrupt storage

* fix key

* persist

* feedback

* feedback

* better to give the full path

* tweaks

* grammar

* add time

* feedback

* adjust

* try to get issue_domain from storage key

* coverage

* tweak wording some more
2023-07-19 09:23:12 +02:00
..
__init__.py
test_aiohttp_client.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_aiohttp_compat.py Restore original aiohttp cancelation behavior (#88046) 2023-02-13 22:00:36 -06:00
test_area_registry.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_check_config.py Add typing to tests with single hass argument (2) (#87675) 2023-02-08 08:51:43 +01:00
test_collection.py Support marking an assist pipeline as preferred (#91418) 2023-04-15 10:05:46 -04:00
test_condition.py Fix lingering timer in condition tests (#89807) 2023-03-16 18:19:29 +01:00
test_config_entry_flow.py Fix lingering timer in cloud (#90822) 2023-04-07 11:38:17 +02:00
test_config_entry_oauth2_flow.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_config_validation.py Refactor async_get_hass to rely on threading.local instead of a ContextVar (#96005) 2023-07-07 14:52:38 -04:00
test_debounce.py Fix debouncer not scheduling timer when wrapped function raises (#94689) 2023-06-15 22:15:49 -04:00
test_deprecation.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_device_registry.py Move device info validation to device registry (#96465) 2023-07-14 08:55:17 -04:00
test_discovery.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_discovery_flow.py Prevent new discovery flows from being created when stopping (#88743) 2023-02-25 12:02:07 +01:00
test_dispatcher.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_entity.py Move device info validation to device registry (#96465) 2023-07-14 08:55:17 -04:00
test_entity_component.py Add service response data for listing calendar events (#94759) 2023-06-23 23:34:34 -04:00
test_entity_platform.py Move device info validation to device registry (#96465) 2023-07-14 08:55:17 -04:00
test_entity_registry.py Stable entity registry id when a deleted entity is restored (#77710) 2023-06-26 15:54:35 +02:00
test_entity_values.py Limit cache size of EntityValues (#94983) 2023-06-21 22:23:35 +02:00
test_entityfilter.py Reduce overhead to filter entities in the recorder (#93656) 2023-05-27 19:52:42 -04:00
test_event.py Add event helper to dispatch device registry updates by device_id (#93602) 2023-05-27 20:04:09 -04:00
test_frame.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_httpx_client.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_icon.py Add return type to tests without arguments (#87613) 2023-02-07 14:20:06 +01:00
test_init.py Add return type to tests without arguments (#87613) 2023-02-07 14:20:06 +01:00
test_instance_id.py Regenerate instance ID on error (#94898) 2023-06-20 11:16:51 +02:00
test_integration_platform.py Migrate integration_platform helper to use async_get_integrations (#89303) 2023-03-08 16:01:47 -05:00
test_intent.py Update service call return values and error handling (#94657) 2023-06-16 07:01:40 -07:00
test_issue_registry.py Adjust issue_registry imports (#88878) 2023-02-28 21:55:44 -05:00
test_json.py Refactor json tests to align with new code (#88247) 2023-02-16 21:34:19 +01:00
test_location.py Add typing to tests with single hass argument (2) (#87675) 2023-02-08 08:51:43 +01:00
test_network.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_ratelimit.py Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
test_recorder.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_reload.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_restore_state.py Add slots to the StateMachine class (#95849) 2023-07-05 14:00:37 +02:00
test_schema_config_entry_flow.py Try to load integration before starting option flow (#90111) 2023-03-22 20:10:10 +01:00
test_script.py Add script specific error messages for `response_variable` (#95188) 2023-06-24 21:34:57 -07:00
test_script_variables.py Add typing to tests with single hass argument (2) (#87675) 2023-02-08 08:51:43 +01:00
test_selector.py Make default theme selectable for set theme service (#96849) 2023-07-18 17:36:35 +02:00
test_service.py Fix mixed case service schema registration (#96448) 2023-07-12 14:39:51 -10:00
test_significant_change.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_singleton.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_start.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_state.py Remove deprecated state.get_changed_since (#96579) 2023-07-18 09:42:48 +02:00
test_storage.py Improve handling of unrecoverable storage corruption (#96712) 2023-07-19 09:23:12 +02:00
test_storage_remove.py Import `util.dt` as `dt_util` in remaining tests, enforce with ruff (#93765) 2023-05-30 23:30:31 +03:00
test_sun.py Fix infinite loop in sun.sun (#89723) 2023-03-14 16:27:29 -10:00
test_system_info.py Ensure async_get_system_info does not fail if supervisor is unavailable (#96492) 2023-07-16 11:10:07 -04:00
test_temperature.py Add typing to tests with single hass argument (#87631) 2023-02-07 15:01:16 +01:00
test_template.py Add slots to the StateMachine class (#95849) 2023-07-05 14:00:37 +02:00
test_translation.py Add pre-defined entity name translations (#89792) 2023-03-16 21:10:20 +01:00
test_trigger.py Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
test_update_coordinator.py Add ability to shutdown a coordinator on STOP (#92611) 2023-05-05 16:05:03 +02:00