fix(server): add error handling for malformed OTA manifest and missing sig file
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -68,3 +68,9 @@ def test_firmware_endpoint_missing_raises(tmp_path):
|
||||
import server.ota_endpoint as mod
|
||||
with pytest.raises(mod.FirmwareNotFoundError):
|
||||
ota_firmware_impl(firmware_dir=tmp_path)
|
||||
|
||||
|
||||
def test_check_malformed_manifest(tmp_path):
|
||||
(tmp_path / "manifest.json").write_text("not valid json{{{")
|
||||
result = ota_check_impl(current_version="1.0.0", firmware_dir=tmp_path)
|
||||
assert result["update"] is False
|
||||
|
||||
Reference in New Issue
Block a user