mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-09-07 21:12:35 +00:00
This adds a test suite for fifloader (renamed fifloader.py for test sanity). It adds JSON Schema form schemas for both FIF and upstream openQA template data, and has fifloader (optionally, but by default) validate both input and output data against the schemas. It also adds a tox.ini configured to run the fifloader tests, use fifloader to validate the template files, and do diff coverage and lint checks. It also adjusts the Zuul config to run tox instead of the test job. There are also some pylint cleanups, since the new tests run pylint. fifcheck, fifconverter and tojson.pm are removed, as they were mainly only needed for one-time conversion of the old format templates; now they are in the git history we can always recover them if we need them. Along with all this I updated the README a bit to explain some of it (and explain FIF better), and to explicitly state that this repo is GPLv2+ licensed, and added GPL headers to some of the files. Signed-off-by: Adam Williamson <awilliam@redhat.com>
60 lines
1.4 KiB
JSON
60 lines
1.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "openqa-jobtemplate.json",
|
|
"title": "Upstream openQA single job template schema",
|
|
"type": "object",
|
|
"title": "A single job template schema",
|
|
"allOf": [
|
|
{
|
|
"oneOf": [
|
|
{ "required": [ "test_suite" ] },
|
|
{ "required": [ "test_suite_name" ] }
|
|
]
|
|
},
|
|
{
|
|
"oneOf": [
|
|
{ "required": [ "machine" ] },
|
|
{ "required": [ "machine_name" ] }
|
|
]
|
|
},
|
|
{
|
|
"oneOf": [
|
|
{ "required": [ "product" ] },
|
|
{ "required": [
|
|
"arch",
|
|
"distri",
|
|
"flavor",
|
|
"version"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"properties": {
|
|
"group_name": { "type": "string" },
|
|
"machine": {
|
|
"type": "object",
|
|
"required": [ "name" ],
|
|
"properties": {
|
|
"name": { "type": "string" }
|
|
}
|
|
},
|
|
"machine_name": { "type": "string" },
|
|
"prio": { "type": "number" },
|
|
"product": { "$ref": "openqa-product.json" },
|
|
"arch": { "type": "string" },
|
|
"distri": { "type": "string" },
|
|
"flavor": { "type": "string" },
|
|
"version": { "type": "string" },
|
|
"test_suite": {
|
|
"type": "object",
|
|
"required": [ "name" ],
|
|
"properties": {
|
|
"name": { "type": "string" }
|
|
}
|
|
},
|
|
"test_suite_name": { "type": "string" }
|
|
},
|
|
"additionalProperties": false
|
|
}
|