-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for component configuration with extra keys (#103959)
- Loading branch information
1 parent
fe15ed4
commit 44c1cef
Showing
13 changed files
with
95 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tests/fixtures/core/config/component_validation/basic_include/integrations/adr_0007_4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# no_such_option does not exist | ||
host: blah.com | ||
no_such_option: foo |
9 changes: 6 additions & 3 deletions
9
tests/fixtures/core/config/component_validation/basic_include/integrations/iot_domain.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
# This is correct and should not generate errors | ||
- platform: non_adr_0007 | ||
option1: abc | ||
# This violates the non_adr_0007.iot_domain platform schema | ||
# This violates the iot_domain platform schema (platform missing) | ||
- paltfrom: non_adr_0007 | ||
# This violates the non_adr_0007.iot_domain platform schema (option1 wrong type) | ||
- platform: non_adr_0007 | ||
option1: 123 | ||
# This violates the iot_domain platform schema | ||
- paltfrom: non_adr_0007 | ||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist) | ||
- platform: non_adr_0007 | ||
no_such_option: abc |
5 changes: 2 additions & 3 deletions
5
...s/fixtures/core/config/component_validation/include_dir_list/iot_domain/iot_domain_2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# This violates the non_adr_0007.iot_domain platform schema | ||
platform: non_adr_0007 | ||
option1: 123 | ||
# This violates the iot_domain platform schema (platform missing) | ||
paltfrom: non_adr_0007 |
5 changes: 3 additions & 2 deletions
5
...s/fixtures/core/config/component_validation/include_dir_list/iot_domain/iot_domain_3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# This violates the iot_domain platform schema | ||
paltfrom: non_adr_0007 | ||
# This violates the non_adr_0007.iot_domain platform schema (option1 wrong type) | ||
platform: non_adr_0007 | ||
option1: 123 |
3 changes: 3 additions & 0 deletions
3
...s/fixtures/core/config/component_validation/include_dir_list/iot_domain/iot_domain_4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist) | ||
platform: non_adr_0007 | ||
no_such_option: abc |
2 changes: 2 additions & 0 deletions
2
...ures/core/config/component_validation/include_dir_merge_list/iot_domain/iot_domain_1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# This is correct and should not generate errors | ||
- platform: non_adr_0007 | ||
option1: abc | ||
# This violates the iot_domain platform schema (platform missing) | ||
- paltfrom: non_adr_0007 |
7 changes: 4 additions & 3 deletions
7
...ures/core/config/component_validation/include_dir_merge_list/iot_domain/iot_domain_2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# This violates the non_adr_0007.iot_domain platform schema | ||
# This violates the non_adr_0007.iot_domain platform schema (option1 wrong type) | ||
- platform: non_adr_0007 | ||
option1: 123 | ||
# This violates the iot_domain platform schema | ||
- paltfrom: non_adr_0007 | ||
# This violates the non_adr_0007.iot_domain platform schema (no_such_option does not exist) | ||
- platform: non_adr_0007 | ||
no_such_option: abc |
28 changes: 19 additions & 9 deletions
28
tests/fixtures/core/config/component_validation/packages/configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
homeassistant: | ||
packages: | ||
pack_1: | ||
pack_iot_domain_1: | ||
iot_domain: | ||
# This is correct and should not generate errors | ||
- platform: non_adr_0007 | ||
option1: abc | ||
pack_2: | ||
pack_iot_domain_2: | ||
iot_domain: | ||
# This violates the non_adr_0007.iot_domain platform schema | ||
# This violates the iot_domain platform schema (platform missing) | ||
- paltfrom: non_adr_0007 | ||
pack_iot_domain_3: | ||
iot_domain: | ||
# This violates the non_adr_0007.iot_domain platform schema (option1 wrong type) | ||
- platform: non_adr_0007 | ||
option1: 123 | ||
pack_3: | ||
pack_iot_domain_4: | ||
iot_domain: | ||
# This violates the iot_domain platform schema | ||
- paltfrom: non_adr_0007 | ||
pack_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 | ||
pack_adr_0007_1: | ||
# This is correct and should not generate errors | ||
adr_0007_1: | ||
host: blah.com | ||
pack_5: | ||
pack_adr_0007_2: | ||
# Host is missing | ||
adr_0007_2: | ||
pack_6: | ||
pack_adr_0007_3: | ||
# Port is wrong type | ||
adr_0007_3: | ||
host: blah.com | ||
port: foo | ||
pack_adr_0007_4: | ||
# no_such_option does not exist | ||
adr_0007_4: | ||
host: blah.com | ||
no_such_option: foo |
4 changes: 4 additions & 0 deletions
4
.../core/config/component_validation/packages_include_dir_named/integrations/adr_0007_4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# no_such_option does not exist | ||
adr_0007_4: | ||
host: blah.com | ||
no_such_option: foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters