Skip to content

Commit c00b656

Browse files
committed
(tests/validator) Improve build_configs verification
As it is built on case by case, we check check build config for mandatory options: tree and branch Signed-off-by: Denys Fedoryshchenko <[email protected]>
1 parent 47c2ff5 commit c00b656

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/validate_yaml.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ def validate_build_configs(data):
110110
raise yaml.YAMLError(
111111
f"Tree {entry.get('tree')} not found in trees"
112112
)
113+
# each build config must have fields tree and branch
114+
if not build_configs[entry].get('tree'):
115+
raise yaml.YAMLError(
116+
f"Tree not found for build config: {entry}'"
117+
)
118+
if not build_configs[entry].get('branch'):
119+
raise yaml.YAMLError(
120+
f"Branch not found for build config: {entry}'"
121+
)
113122

114123
def validate_unused_trees(data):
115124
'''

0 commit comments

Comments
 (0)