diff --git a/schemas/performance-artifact.json b/schemas/performance-artifact.json index 3784154d3..dc69996ba 100644 --- a/schemas/performance-artifact.json +++ b/schemas/performance-artifact.json @@ -18,9 +18,7 @@ "value": { "description": "Summary value for subtest", "title": "Subtest value", - "type": "number", - "minimum": -1000000000.0, - "maximum": 1000000000.0 + "type": "number" }, "lowerIsBetter": { "description": "Whether lower values are better for subtest", @@ -35,30 +33,22 @@ "alertThreshold": { "description": "% change threshold before alerting", "title": "Alert threshold", - "type": "number", - "minimum": 0.0, - "maximum": 1000.0 + "type": "number" }, "minBackWindow": { "description": "Minimum back window to use for alerting", "title": "Minimum back window", - "type": "number", - "minimum": 1, - "maximum": 255 + "type": "number" }, "maxBackWindow": { "description": "Maximum back window to use for alerting", "title": "Maximum back window", - "type": "number", - "minimum": 1, - "maximum": 255 + "type": "number" }, "foreWindow": { "description": "Fore window to use for alerting", "title": "Fore window", - "type": "number", - "minimum": 1, - "maximum": 255 + "type": "number" } }, "required": [ @@ -90,9 +80,7 @@ }, "value": { "title": "Suite value", - "type": "number", - "minimum": -1000000000.0, - "maximum": 1000000000.0 + "type": "number" }, "lowerIsBetter": { "description": "Whether lower values are better for suite", @@ -107,30 +95,22 @@ "alertThreshold": { "description": "% change threshold before alerting", "title": "Alert threshold", - "type": "number", - "minimum": 0.0, - "maximum": 1000.0 + "type": "number" }, "minBackWindow": { "description": "Minimum back window to use for alerting", "title": "Minimum back window", - "type": "integer", - "minimum": 1, - "maximum": 255 + "type": "number" }, "maxBackWindow": { "description": "Maximum back window to use for alerting", "title": "Maximum back window", - "type": "integer", - "minimum": 1, - "maximum": 255 + "type": "number" }, "foreWindow": { "description": "Fore window to use for alerting", "title": "Fore window", - "type": "integer", - "minimum": 1, - "maximum": 255 + "type": "number" } }, "required": [ diff --git a/tests/etl/test_perf_schema.py b/tests/etl/test_perf_schema.py deleted file mode 100644 index 712966b75..000000000 --- a/tests/etl/test_perf_schema.py +++ /dev/null @@ -1,31 +0,0 @@ -import json - -import jsonschema -import pytest - - -@pytest.mark.parametrize(('suite_value', 'test_value', 'expected_fail'), - [({}, {}, True), - ({'value': 1234}, {}, True), - ({}, {'value': 1234}, False), - ({'value': 1234}, {'value': 1234}, False), - ({'value': float('inf')}, {}, True), - ({}, {'value': float('inf')}, True)]) -def test_perf_schema(suite_value, test_value, expected_fail): - perf_schema = json.load(open('schemas/performance-artifact.json')) - datum = { - "framework": {"name": "talos"}, "suites": [{ - "name": "basic_compositor_video", - "subtests": [{ - "name": "240p.120fps.mp4_scale_fullscreen_startup" - }] - }] - } - datum['suites'][0].update(suite_value) - datum['suites'][0]['subtests'][0].update(test_value) - print datum - if expected_fail: - with pytest.raises(jsonschema.ValidationError): - jsonschema.validate(datum, perf_schema) - else: - jsonschema.validate(datum, perf_schema)