Skip to content

Commit

Permalink
Renaming 'tests' to 'runs' in the schema (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbazzan committed Nov 4, 2021
1 parent 30d145e commit 5cbe182
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions kcidb_io/schema/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@
},

# A test run on a build
"test": {
"title": "test",
"run": {
"title": "test run",
"description":
"A test run against a build.\n"
"\n"
Expand Down Expand Up @@ -545,10 +545,10 @@
"type": "array",
"items": {"$ref": "#/$defs/build"},
},
"tests": {
"runs": {
"description": "List of test runs",
"type": "array",
"items": {"$ref": "#/$defs/test"},
"items": {"$ref": "#/$defs/run"},
},
},
"additionalProperties": False,
Expand Down Expand Up @@ -594,7 +594,7 @@ def get_version(data):
"": ["revisions"],
"revisions": ["builds"],
"builds": ["tests"],
"tests": []
"runs": []
}

VERSION = Version(JSON_VERSION_MAJOR, JSON_VERSION_MINOR, JSON, TREE,
Expand Down
8 changes: 4 additions & 4 deletions kcidb_io/schema/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@
},

# A test run on a build
"test": {
"title": "test",
"run": {
"title": "test run",
"description":
"A test run against a build.\n"
"\n"
Expand Down Expand Up @@ -516,10 +516,10 @@
"type": "array",
"items": {"$ref": "#/$defs/build"},
},
"tests": {
"runs": {
"description": "List of test runs",
"type": "array",
"items": {"$ref": "#/$defs/test"}
"items": {"$ref": "#/$defs/run"}
},
},
"additionalProperties": False,
Expand Down
8 changes: 4 additions & 4 deletions kcidb_io/schema/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@
},

# A test run on a build
"test": {
"title": "test",
"run": {
"title": "test run",
"description":
"A test run against a build.\n"
"\n"
Expand Down Expand Up @@ -602,10 +602,10 @@
"type": "array",
"items": {"$ref": "#/$defs/build"},
},
"tests": {
"runs": {
"description": "List of test runs",
"type": "array",
"items": {"$ref": "#/$defs/test"},
"items": {"$ref": "#/$defs/run"},
},
},
"additionalProperties": False,
Expand Down
12 changes: 6 additions & 6 deletions kcidb_io/schema/v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@
},

# A test run on a build
"test": {
"title": "test",
"run": {
"title": "test run",
"description":
"A test run against a build.\n"
"\n"
Expand Down Expand Up @@ -670,10 +670,10 @@
"type": "array",
"items": {"$ref": "#/$defs/build"},
},
"tests": {
"runs": {
"description": "List of test runs",
"type": "array",
"items": {"$ref": "#/$defs/test"},
"items": {"$ref": "#/$defs/run"},
},
},
"additionalProperties": False,
Expand Down Expand Up @@ -735,7 +735,7 @@ def inherit(data):
build['comment'] = build.pop('description')

# Inherit tests
for test in data.get('tests', []):
for test in data.get('runs', []):
# Rename 'description' to 'comment'
if 'description' in test:
test['comment'] = test.pop('description')
Expand All @@ -757,7 +757,7 @@ def inherit(data):
"": ["checkouts"],
"checkouts": ["builds"],
"builds": ["tests"],
"tests": []
"runs": []
}

VERSION = Version(JSON_VERSION_MAJOR, JSON_VERSION_MINOR, JSON,
Expand Down

0 comments on commit 5cbe182

Please sign in to comment.