mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Throw error in hassfest when integration is missing version (#45976)
This commit is contained in:
parent
9c6c2a77ab
commit
1a74709757
@ -119,7 +119,7 @@ def validate_version(integration: Integration):
|
||||
Will be removed when the version key is no longer optional for custom integrations.
|
||||
"""
|
||||
if not integration.manifest.get("version"):
|
||||
integration.add_warning(
|
||||
integration.add_error(
|
||||
"manifest",
|
||||
"No 'version' key in the manifest file. This will cause a future version of Home Assistant to block this integration.",
|
||||
)
|
||||
|
@ -27,7 +27,7 @@ def test_validate_version_no_key(integration: Integration):
|
||||
validate_version(integration)
|
||||
assert (
|
||||
"No 'version' key in the manifest file. This will cause a future version of Home Assistant to block this integration."
|
||||
in [x.error for x in integration.warnings]
|
||||
in [x.error for x in integration.errors]
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user