Skip to content

Commit 9cd5682

Browse files
badboychutten
authored andcommitted
Correctly call out 15 extra keys limit in schema docs
1 parent 4e2b161 commit 9cd5682

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

glean_parser/schemas/metrics.2-0-0.schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ definitions:
368368
description: |
369369
The acceptable keys on the "extra" object sent with events. This is an
370370
object mapping the key to an object containing metadata about the key.
371-
A maximum of 10 extra keys is allowed.
371+
A maximum of 15 extra keys is allowed.
372372
This metadata object has the following keys:
373373
374374
- `description`: **Required.** A description of the key.

tests/test_parser.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def test_parser_schema_violation():
194194
Documentation for this node:
195195
The acceptable keys on the "extra" object sent with events. This is an
196196
object mapping the key to an object containing metadata about the key.
197-
A maximum of 10 extra keys is allowed.
197+
A maximum of 15 extra keys is allowed.
198198
This metadata object has the following keys:
199199
- `description`: **Required.** A description of the key.
200200
Valid when `type`_ is `event`.
@@ -206,7 +206,12 @@ def test_parser_schema_violation():
206206
for x in expected_errors
207207
)
208208

209-
assert sorted(list(found_errors)) == sorted(list(expected_errors))
209+
# Compare errors 1-by-1 for better assertion message when it fails.
210+
found = sorted(list(found_errors))
211+
expected = sorted(list(expected_errors))
212+
213+
for found_error, expected_error in zip(found, expected):
214+
assert found_error == expected_error
210215

211216

212217
def test_parser_empty():

0 commit comments

Comments
 (0)