Add tests for component configuration with multiple errors (#103964)
* Add tests for component configuration with multiple errors * Add new configuration file * Fix typo --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -10,6 +10,14 @@ iot_domain:
|
||||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist)
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option1: abc
|
||||
# This violates the non_adr_0007.iot_domain platform schema:
|
||||
# - no_such_option does not exist
|
||||
# - option1 is missing
|
||||
# - option2 is wrong type
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option2: 123
|
||||
|
||||
# This is correct and should not generate errors
|
||||
adr_0007_1:
|
||||
@@ -27,3 +35,11 @@ adr_0007_3:
|
||||
adr_0007_4:
|
||||
host: blah.com
|
||||
no_such_option: foo
|
||||
|
||||
# Multiple errors:
|
||||
# - host is missing
|
||||
# - no_such_option does not exist
|
||||
# - port is wrong type
|
||||
adr_0007_5:
|
||||
no_such_option: foo
|
||||
port: foo
|
||||
|
||||
@@ -2,3 +2,5 @@ iot_domain: !include integrations/iot_domain.yaml
|
||||
adr_0007_1: !include integrations/adr_0007_1.yaml
|
||||
adr_0007_2: !include integrations/adr_0007_2.yaml
|
||||
adr_0007_3: !include integrations/adr_0007_3.yaml
|
||||
adr_0007_4: !include integrations/adr_0007_4.yaml
|
||||
adr_0007_5: !include integrations/adr_0007_5.yaml
|
||||
|
||||
6
tests/fixtures/core/config/component_validation/basic_include/integrations/adr_0007_5.yaml
vendored
Normal file
6
tests/fixtures/core/config/component_validation/basic_include/integrations/adr_0007_5.yaml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# Multiple errors:
|
||||
# - host is missing
|
||||
# - no_such_option does not exist
|
||||
# - port is wrong type
|
||||
no_such_option: foo
|
||||
port: foo
|
||||
@@ -9,3 +9,11 @@
|
||||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist)
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option1: abc
|
||||
# This violates the non_adr_0007.iot_domain platform schema:
|
||||
# - no_such_option does not exist
|
||||
# - option1 is missing
|
||||
# - option2 is wrong type
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option2: 123
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist)
|
||||
platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option1: abc
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# This violates the non_adr_0007.iot_domain platform schema:
|
||||
# - no_such_option does not exist
|
||||
# - option1 is missing
|
||||
# - option2 is wrong type
|
||||
platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option2: 123
|
||||
@@ -4,3 +4,11 @@
|
||||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist)
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option1: abc
|
||||
# This violates the non_adr_0007.iot_domain platform schema:
|
||||
# - no_such_option does not exist
|
||||
# - option1 is missing
|
||||
# - option2 is wrong type
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option2: 123
|
||||
|
||||
@@ -19,6 +19,16 @@ homeassistant:
|
||||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist)
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option1: abc
|
||||
pack_iot_domain_5:
|
||||
iot_domain:
|
||||
# This violates the non_adr_0007.iot_domain platform schema:
|
||||
# - no_such_option does not exist
|
||||
# - option1 is missing
|
||||
# - option2 is wrong type
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option2: 123
|
||||
pack_adr_0007_1:
|
||||
# This is correct and should not generate errors
|
||||
adr_0007_1:
|
||||
@@ -36,3 +46,11 @@ homeassistant:
|
||||
adr_0007_4:
|
||||
host: blah.com
|
||||
no_such_option: foo
|
||||
pack_adr_0007_5:
|
||||
# Multiple errors:
|
||||
# - host is missing
|
||||
# - no_such_option does not exist
|
||||
# - port is wrong type
|
||||
adr_0007_5:
|
||||
no_such_option: foo
|
||||
port: foo
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Multiple errors:
|
||||
# - host is missing
|
||||
# - no_such_option does not exist
|
||||
# - port is wrong type
|
||||
adr_0007_5:
|
||||
no_such_option: foo
|
||||
port: foo
|
||||
@@ -9,4 +9,12 @@ iot_domain:
|
||||
option1: 123
|
||||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist)
|
||||
- platform: non_adr_0007
|
||||
- no_such_option: abc
|
||||
no_such_option: abc
|
||||
option1: abc
|
||||
# This violates the non_adr_0007.iot_domain platform schema:
|
||||
# - no_such_option does not exist
|
||||
# - option1 is missing
|
||||
# - option2 is wrong type
|
||||
- platform: non_adr_0007
|
||||
no_such_option: abc
|
||||
option2: 123
|
||||
|
||||
Reference in New Issue
Block a user