JSON schema validation produces unhelpful error message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UTAH |
Fix Released
|
Wishlist
|
Javier Collado |
Bug Description
I'm currently trying to set up UTAH metadata for my new desktop integration tests, according to https:/
Master runlist failed to validate: '/home/
Detailed information: {'testsuites': [{'name': 'tests'}]} is not of type [{'items': {'type': 'object', 'properties': {'fetch_cmd': {'required': True, 'type': 'string'}, 'exclude_tests': {'items': {'type': 'string'}, 'type': 'array'}, 'name': {'required': True, 'type': 'string'}, 'include_tests': {'items': {'type': 'string'}, 'type': 'array'}}}, 'type': 'array'}, {'type': 'object', 'properties': {'repeat_count': {'minimum': 0, 'type': 'integer'}, 'type': {'enum': ['smoke', 'kernel-sru', 'bootspeed', 'upgrade'], 'type': 'string'}, 'publish': {'type': 'object', 'properties': {'url': {'required': True, 'type': 'string'}, 'token': {'required': True, 'type': 'string'}, 'name': {'required': True, 'type': 'string'}}}, 'timeout': {'minimum': 0, 'type': 'integer'}, 'testsuites': {'required': True, 'type': [{'items': {'type': 'object', 'properties': {'fetch_cmd': {'required': True, 'type': 'string'}, 'exclude_tests': {'items': {'type': 'string'}, 'type': 'array'}, 'name': {'required': True, 'type': 'string'}, 'include_tests': {'items': {'type': 'string'}, 'type': 'array'}}}, 'type': 'array'}]}}}]
This is not a helpful error message. I am doing changes over changes in the various master.run, testcase.run, ts_control, tc_control etc. files that this requires me to write, but there is no real way to tell me whether I'm going in the right direction.
Can the error messages please be more specific in what files, keys, or values are missing or wrong?
Related branches
- Andy Doan (community): Approve
- Javier Collado (community): Needs Resubmitting
-
Diff: 1264 lines (+693/-209)19 files modifieddebian/changelog (+1/-0)
debian/control (+3/-3)
docs/source/development.rst (+16/-14)
utah/client/common.py (+23/-9)
utah/client/examples/examples/tslist.run (+3/-3)
utah/client/examples/master.run (+0/-4)
utah/client/examples/pass.run (+0/-4)
utah/client/examples/utah_tests/tslist.run (+1/-1)
utah/client/examples/utah_tests_sample/tslist.run (+2/-1)
utah/client/exceptions.py (+0/-7)
utah/client/result.py (+1/-6)
utah/client/runner.py (+60/-79)
utah/client/testcase.py (+19/-34)
utah/client/tests/common.py (+0/-4)
utah/client/tests/test_jsonschema.py (+1/-16)
utah/client/tests/test_runner.py (+235/-1)
utah/client/tests/test_testcase.py (+167/-17)
utah/client/tests/test_testsuite.py (+135/-1)
utah/client/testsuite.py (+26/-5)
Changed in utah: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
summary: |
- Unhelpful error message + JSON schema validation produces unhelpful error message |
Changed in utah: | |
assignee: | nobody → Javier Collado (javier.collado) |
status: | Triaged → In Progress |
Changed in utah: | |
status: | In Progress → Fix Committed |
Changed in utah: | |
milestone: | none → 0.12 |
Changed in utah: | |
status: | Fix Committed → Fix Released |
The error message comes from the jsonschema library itself. This is something we are already aware of, but that we cannot fix in our code. Anyway, I took a look at the jsonschema code and it wouldn't be to hard to at least pretty print the dictionaries to have something more readable.