From f198e9a0b30fd884943aed454c9c00a7a4dd14bc Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 24 Nov 2025 14:11:54 -0500 Subject: [PATCH] Document the JSON Schema testing a bit --- doc/manual/source/development/testing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/manual/source/development/testing.md b/doc/manual/source/development/testing.md index 7c2cbbb5d..dd965862a 100644 --- a/doc/manual/source/development/testing.md +++ b/doc/manual/source/development/testing.md @@ -137,6 +137,12 @@ $ _NIX_TEST_ACCEPT=1 meson test nix-store-tests -v will regenerate the "golden master" expected result for the `libnixstore` characterisation tests. The characterisation tests will mark themselves "skipped" since they regenerated the expected result instead of actually testing anything. +### JSON Schema testing + +In `doc/manual/source/protocols/json/` we have a number of manual pages generated from [JSON Schema](https://json-schema.org/). +That JSON schema is tested against the JSON file test data used in [characterisation tests](#characterisation-testing-unit ) for JSON (de)serialization, in `src/json-schema-checks`. +Between the JSON (de)serialization testing, and this testing of the same data against the schema, we make sure that the manual, the implementation, and a machine-readable schema are are all in sync. + ### Unit test support libraries There are headers and code which are not just used to test the library in question, but also downstream libraries.