Throw error in hassfest when integration is missing version (#45976)
This commit is contained in:
parent
9c6c2a77ab
commit
1a74709757
2 changed files with 2 additions and 2 deletions
|
@ -119,7 +119,7 @@ def validate_version(integration: Integration):
|
||||||
Will be removed when the version key is no longer optional for custom integrations.
|
Will be removed when the version key is no longer optional for custom integrations.
|
||||||
"""
|
"""
|
||||||
if not integration.manifest.get("version"):
|
if not integration.manifest.get("version"):
|
||||||
integration.add_warning(
|
integration.add_error(
|
||||||
"manifest",
|
"manifest",
|
||||||
"No 'version' key in the manifest file. This will cause a future version of Home Assistant to block this integration.",
|
"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)
|
validate_version(integration)
|
||||||
assert (
|
assert (
|
||||||
"No 'version' key in the manifest file. This will cause a future version of Home Assistant to block this integration."
|
"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…
Add table
Reference in a new issue