Skip to content

Commit 8caf290

Browse files
committedJul 22, 2024
validate_yaml.py: Add more job validations
Add basic validation, each job must have kind parameter Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent 28f9f79 commit 8caf290

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎tests/validate_yaml.py

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def validate_jobs(jobs):
3636
Validate jobs, they must have a kcidb_test_suite mapping
3737
'''
3838
for name, definition in jobs.items():
39+
if not definition.get('kind'):
40+
raise yaml.YAMLError(
41+
f"Kind not found for job: {name}'"
42+
)
3943
if definition.get('kind') in ("test", "job"):
4044
if not definition.get('kcidb_test_suite'):
4145
raise yaml.YAMLError(

0 commit comments

Comments
 (0)
Failed to load comments.