Browse Source

Allow extra data in artifact schema validation

The schema validator for zuul.artifacts returned via zuul_return
did not allow for extra return data (outside of the zuul hierarchy).

Correct the validator to allow that, and update the test to exercise
it.

Change-Id: Ia8d7ed212b03d978bec1a7de1a2647b0c87b7cf9
changes/38/638038/1
James E. Blair 3 years ago
parent
commit
5271b592af
  1. 2
      tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml
  2. 3
      zuul/lib/artifacts.py

2
tests/fixtures/config/sql-driver/git/common-config/playbooks/project-test1.yaml

@ -3,6 +3,8 @@
- name: Return artifact data
zuul_return:
data:
something_else:
foo: bar
zuul:
artifacts:
- name: relative

3
zuul/lib/artifacts.py

@ -26,7 +26,8 @@ zuul_data = {
'log_url': str,
'artifacts': [artifact],
v.Extra: object,
}
},
v.Extra: object,
}
artifact_schema = v.Schema(zuul_data)

Loading…
Cancel
Save