manifest validation: missing 'continue' when some key doesnt exist to try to prevent miserably crashing (#113)

This commit is contained in:
Alexandre Aubin 2023-06-10 23:50:05 +02:00 committed by GitHub
parent 5c6da773a2
commit a640c914df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1700,6 +1700,7 @@ class Manifest(TestSuite):
for key, validator in keys.items(): for key, validator in keys.items():
if key not in self.manifest.get("integration", {}): if key not in self.manifest.get("integration", {}):
yield Error(f"Missing key in the integration section: {key}") yield Error(f"Missing key in the integration section: {key}")
continue
value = self.manifest["integration"][key] value = self.manifest["integration"][key]
if not validator[0](value): if not validator[0](value):
yield Error(f"Error found with key {key} in the 'integration' section: {validator[1]}, got: {value}") yield Error(f"Error found with key {key} in the 'integration' section: {validator[1]}, got: {value}")