Commit f69744f
committed
osbuild: compare Go against JSON
New test that parses the Go implementation of the `osbuild` stages using
the `ast` module (this was quite a bit of work, but surprisingly
straightforward even if verbose).
Ensures types in the JSON files match types in the Go files, including
any type aliases.
Outputs informational bits about missing properties on the Go side or
osbuild side. Outputs information about stages that in osbuild that do
not have any Go counterpart.
Does *not* properly validate `anyOf`/`enum`/etc. But this basic
validation is already helpful and followups are very possible.
By default looks in `/usr/lib/osbuild`; if no stages can be found the
test is skipped. Custom directory can be passed through
`TEST_OSBUILD_STAGES_DIR`.
Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>1 parent ec06214 commit f69744f
1 file changed
Lines changed: 616 additions & 0 deletions
0 commit comments