mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-26 05:16:32 +00:00
Remove discovery config validation from supervisor (#4937)
* Remove discovery config validation from supervisor * Remove invalid test * Change validation to require a dictionary for compatibility
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
"""Validate Add-on configs."""
|
||||
|
||||
import logging
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
import voluptuous as vol
|
||||
@@ -288,14 +286,3 @@ def test_valid_slug():
|
||||
config["slug"] = "complemento telefónico"
|
||||
with pytest.raises(vol.Invalid):
|
||||
assert vd.SCHEMA_ADDON_CONFIG(config)
|
||||
|
||||
|
||||
def test_invalid_discovery(capture_event: Mock, caplog: pytest.LogCaptureFixture):
|
||||
"""Test invalid discovery."""
|
||||
config = load_json_fixture("basic-addon-config.json")
|
||||
config["discovery"] = ["mqtt", "junk", "junk2"]
|
||||
|
||||
assert vd.SCHEMA_ADDON_CONFIG(config)
|
||||
|
||||
with caplog.at_level(logging.WARNING):
|
||||
assert "unknown services for discovery: junk, junk2" in caplog.text
|
||||
|
||||
Reference in New Issue
Block a user