You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: pin _restart_addon untested branches per Boy-Scout
Adds unit-test coverage for the two previously-untested branches in
settings_ui.py:_restart_addon:
- Missing SUPERVISOR_TOKEN (settings_ui.py:780-789) — non-addon installs
hit this when the user clicks Restart against a Docker/pyinstaller
setup; the structured 400 must surface rather than ever reaching the
Supervisor URL.
- Connection-drop-as-success (settings_ui.py:798-801) — the Supervisor
kills our process mid-request during a restart, so a ReadError /
RemoteProtocolError / ConnectError from the POST is the documented
success signal.
Mirrors the _capture_handler pattern from TestSaveToolsValidation. The
fixture-level server.settings.verify_ssl = True is required by this
PR's post-G1 access path (httpx accepts only bool/SSLContext for verify=).
Boy-Scout fix while already touching _restart_addon for the
verify_ssl-propagation refactor — closes the test-coverage gap I'd
flagged in homeassistant-ai#960's approve-body but never followed up on at the time.
0 commit comments