Closed Bug 1835824 Opened 2 years ago Closed 2 years ago

Add schema validation testing for search-configuration

Categories

(Firefox :: Search, task, P3)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Although we have the search configuration schema, we don't currently validate the search-config against the schema except via searchengine-devtools.

I think we should have the validation run in tests as well, as we don't always run searchengine-devtools straight away and automated tests would be the better place to catch this.

As part of the schema validation, we should also add additional checking that no additionalProperties are provided for objects. We don't deny additional properties for the live schemas, since we need to be able to cope with older clients receiving new properties. However, we should deny it in tests, so that we can make sure any new properties are added to the schema.

I think I've got something working after discussing with Barret that there's JsonSchema in the tree (which is more what we need than the other in-tree JsonSchemaValidator).

Assignee: nobody → standard8
Depends on: 1835872
Depends on: 1835821

This will also ensure that if we add new properties to the search-config, we'll also need to add them to the schema.

See Also: → 1836107
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8a0c6cebd70d Add a test to validate search-config against the schema. r=search-reviewers,mcheang,daleharvey
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: