Add additional test for package errors (#103955)

* Add additional test for package errors

* Adjust tests
This commit is contained in:
Erik Montnemery 2023-11-14 11:48:56 +01:00 committed by GitHub
parent 44c1cef42e
commit 85eac5a1b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -19,3 +19,6 @@ homeassistant:
pack_4:
adr_0007_3:
host: blah.com
pack_5:
unknown_integration:
host: blah.com

View File

@ -0,0 +1,3 @@
# Unknown integration
unknown_integration:
host: blah.com

View File

@ -57,6 +57,7 @@
'Package pack_1 setup failed. Integration adr_0007_1 cannot be merged. Dict expected in main config. (See <BASE_PATH>/fixtures/core/config/package_errors/packages/configuration.yaml:9).',
'Package pack_2 setup failed. Integration adr_0007_2 cannot be merged. Expected a dict. (See <BASE_PATH>/fixtures/core/config/package_errors/packages/configuration.yaml:13).',
"Package pack_4 setup failed. Integration adr_0007_3 has duplicate key 'host' (See <BASE_PATH>/fixtures/core/config/package_errors/packages/configuration.yaml:20).",
"Package pack_5 setup failed. Integration unknown_integration Integration 'unknown_integration' not found. (See <BASE_PATH>/fixtures/core/config/package_errors/packages/configuration.yaml:23).",
])
# ---
# name: test_package_merge_error[packages_include_dir_named]
@ -64,6 +65,7 @@
'Package adr_0007_1 setup failed. Integration adr_0007_1 cannot be merged. Dict expected in main config. (See <BASE_PATH>/fixtures/core/config/package_errors/packages_include_dir_named/integrations/adr_0007_1.yaml:2).',
'Package adr_0007_2 setup failed. Integration adr_0007_2 cannot be merged. Expected a dict. (See <BASE_PATH>/fixtures/core/config/package_errors/packages_include_dir_named/integrations/adr_0007_2.yaml:2).',
"Package adr_0007_3_2 setup failed. Integration adr_0007_3 has duplicate key 'host' (See <BASE_PATH>/fixtures/core/config/package_errors/packages_include_dir_named/integrations/adr_0007_3_2.yaml:1).",
"Package unknown_integration setup failed. Integration unknown_integration Integration 'unknown_integration' not found. (See <BASE_PATH>/fixtures/core/config/package_errors/packages_include_dir_named/integrations/unknown_integration.yaml:2).",
])
# ---
# name: test_yaml_error[basic]