Test for circular dependencies using manifests (#22908)

* Integration dependencies

* Lint

* Lint

* Fix one test

* Lint

* Fix load custom component integration

Fix async issue
Add circular dependency detection in manifest validation

* Fix test

* Address review comment

* Apply suggestions from code review

Co-Authored-By: balloob <paulus@home-assistant.io>
This commit is contained in:
Paulus Schoutsen
2019-04-09 09:30:32 -07:00
committed by Jason Hu
parent 4110bd0acf
commit cac00f5b26
11 changed files with 314 additions and 89 deletions

View File

@@ -108,8 +108,8 @@ async def _async_setup_component(hass: core.HomeAssistant,
# Validate all dependencies exist and there are no circular dependencies
try:
loader.component_dependencies(hass, domain)
except loader.ComponentNotFound as err:
await loader.async_component_dependencies(hass, domain)
except loader.IntegrationNotFound as err:
_LOGGER.error(
"Not setting up %s because we are unable to resolve "
"(sub)dependency %s", domain, err.domain)