diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2015-03-03 15:28:13 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2015-03-03 15:28:13 +0100 |
commit | f1528ecc454ad54ce80fd4f1b0e6daa8b6ac4775 (patch) | |
tree | 081d37ef173a725aedadaa412c49e5bf95e3b094 | |
parent | b7e63caef0f3d9c7ea36bb2ba2638c04fade8175 (diff) |
doc: Add test GET json schema.
Change-Id: I206c7b7034ac2827c3e3a54dbfb07f2075e77cc7
-rw-r--r-- | doc/schema/1.0/test_case_get.json | 78 | ||||
-rw-r--r-- | doc/schema/1.0/test_set_get.json | 59 | ||||
-rw-r--r-- | doc/schema/1.0/test_suite_get.json | 101 | ||||
-rw-r--r-- | doc/schema/1.0/test_suite_post.json | 12 |
4 files changed, 238 insertions, 12 deletions
diff --git a/doc/schema/1.0/test_case_get.json b/doc/schema/1.0/test_case_get.json new file mode 100644 index 0000000..dadae21 --- /dev/null +++ b/doc/schema/1.0/test_case_get.json @@ -0,0 +1,78 @@ +{ + "$schema": "http://api.kernelci.org/json-schema/1.0/test_case_post.json", + "id": "http://api.kernelci.org/json-schema/1.0/test_case_post.json", + "title": "test_case", + "description": "A test case JSON object as returned by the API", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The version number of this JSON schema", + "enum": ["1.0"] + }, + "_id": { + "type": "string", + "description": "The ID associated with this test case as provided by the database" + }, + "name": { + "type": "string", + "description": "The name given to this test case" + }, + "created_on": { + "type": "object", + "description": "Creation date of this test case in the database", + "properties": { + "$date": { + "type": "number", + "description": "Milliseconds from epoch time", + "format": "utc-millisec" + } + } + }, + "test_set_id": { + "type": "string", + "description": "The test set ID associated with this test case" + }, + "test_suite_id": { + "type": "string", + "description": "The test suite ID associated with this test case" + }, + "unit": { + "type": "string", + "description": "The measurement unit associated with this test", + "enum": ["string", "epoch", "second", "minute", "watt", "volt"], + "default": "string" + }, + "parameters": { + "type": "object", + "description": "Free form object to store key-value pairs describing the parameters used to run the test" + }, + "measure": { + "type": "string", + "description": "The data measured during this test case execution; the value will be interpreted based on the unit field" + }, + "status": { + "type": "string", + "description": "The status of the execution of this test case", + "enum": ["PASS", "FAIL", "SKIP", "ERROR"], + "default": "PASS" + }, + "time": { + "type": "number", + "description": "The number of seconds it took to execute this test case", + "default": -1 + }, + "uri": { + "type": "uri", + "description": "The URI where this test case definition is stored" + }, + "vcs_commit": { + "type": "string", + "description": "The VCS commit value if the $uri field is a VCS URI" + }, + "metadata": { + "type": "object", + "description": "Free form object where accessory test case data is stored" + } + } +} diff --git a/doc/schema/1.0/test_set_get.json b/doc/schema/1.0/test_set_get.json new file mode 100644 index 0000000..298bd13 --- /dev/null +++ b/doc/schema/1.0/test_set_get.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://api.kernelci.org/json-schema/1.0/test_set_get.json", + "id": "http://api.kernelci.org/json-schema/1.0/test_set_get.json", + "title": "test_set", + "description": "A test set JSON object as returned by the API", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The version number of this JSON schema", + "enum": ["1.0"] + }, + "_id": { + "type": "string", + "description": "The ID associated with this test set as provided by the database" + }, + "name": { + "type": "string", + "description": "The name given to this test set" + }, + "created_on": { + "type": "object", + "description": "Creation date of this test set in the database", + "properties": { + "$date": { + "type": "number", + "description": "Milliseconds from epoch time", + "format": "utc-millisec" + } + } + }, + "time": { + "type": "number", + "description": "The number of seconds it took to execute the test set" + }, + "test_suite_id": { + "type": "string", + "description": "The test suite ID associated with this test case" + }, + "test_case": { + "type": "array", + "description": "The list of test case IDs, or test case objects, executed by this test set", + "items": {"$ref": "http://api.kernelci.org/json-schema/1.0/test_case_get.json"}, + "additionalItems": true + }, + "uri": { + "type": "uri", + "description": "The URI where this test set definition is stored" + }, + "vcs_commit": { + "type": "string", + "description": "The VCS commit value if the $uri field is a VCS URI" + }, + "metadata": { + "type": "object", + "description": "Free form object where accessory test set data is stored" + } + } +} diff --git a/doc/schema/1.0/test_suite_get.json b/doc/schema/1.0/test_suite_get.json new file mode 100644 index 0000000..fe5e1c5 --- /dev/null +++ b/doc/schema/1.0/test_suite_get.json @@ -0,0 +1,101 @@ +{ + "$schema": "http://api.kernelci.org/json-schema/1.0/test_suite_get.json", + "id": "http://api.kernelci.org/json-schema/1.0/test_suite_get.json", + "title": "test_suite", + "description": "A test suite JSON object as returned by the API", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The version number of this JSON schema", + "enum": ["1.0"] + }, + "_id": { + "type": "string", + "description": "The ID associated with this test suite as provided by the database" + }, + "name": { + "type": "string", + "description": "The name given to this test suite" + }, + "created_on": { + "type": "object", + "description": "Creation date of this test suite in the database", + "properties": { + "$date": { + "type": "number", + "description": "Milliseconds from epoch time", + "format": "utc-millisec" + } + } + }, + "lab_name": { + "type": "string", + "description": "The name of the lab executing this test suite" + }, + "time": { + "type": "number", + "description": "The number of seconds it took to execute the entire test suite", + "default": -1 + }, + "job": { + "type": "string", + "description": "The name of the job (aka the git tree)" + }, + "kernel": { + "type": "string", + "description": "The name of the kernel or the git describe value" + }, + "defconfig": { + "type": "string", + "description": "The name of the defconfig" + }, + "defconfig_full": { + "type": "string", + "description": "The full name of the defconfig, can also contain config fragments information", + "default": "The defconfig value" + }, + "arch": { + "type": "string", + "description": "The architecture type of this board", + "enum": ["arm", "arm64", "x86"], + "default": "arm" + }, + "board": { + "type": "string", + "description": "The name of the board" + }, + "board_instance": { + "type": "string", + "description": "The instance identifier of the board" + }, + "job_id": { + "type": "string", + "description": "The ID of the job that this test suite is being run on" + }, + "defconfig_id": { + "type": "string", + "description": "The ID of the build that this test suite is being run on" + }, + "boot_id": { + "type": "string", + "description": "The ID of the boot test that this test suite is being run on" + }, + "test_set": { + "type": "array", + "description": "The list of test set IDs, or test set objects, executed by this test suite", + "items": {"$ref": "http://api.kernelci.org/json-schema/1.0/test_set_get.json"}, + "additionalItems": true + }, + "test_case": { + "type": "array", + "description": "The list of test case IDs, or test case objects, executed by this test suite", + "items": {"$ref": "http://api.kernelci.org/json-schema/1.0/test_case_get.json"}, + "additionalItems": true + }, + "metadata": { + "type": "object", + "description": "Free form object where accessory test suite data is stored" + } + } +} diff --git a/doc/schema/1.0/test_suite_post.json b/doc/schema/1.0/test_suite_post.json index 3c32cbe..d0f8e1e 100644 --- a/doc/schema/1.0/test_suite_post.json +++ b/doc/schema/1.0/test_suite_post.json @@ -66,18 +66,6 @@ "type": "string", "description": "The ID of the boot test that this test suite is being run on" }, - "test_set": { - "type": "array", - "description": "The list of test_set IDs executed by this test suite", - "items": {"$ref": "http://api.kernelci.org/json-schema/1.0/test_set_post.json"}, - "additionalItems": true - }, - "test_case": { - "type": "array", - "description": "The list of test_case IDs executed by this test suite", - "items": {"$ref": "http://api.kernelci.org/json-schema/1.0/test_case_post.json"}, - "additionalItems": true - }, "metadata": { "type": "object", "description": "Free form object where to store accessory test suite data" |