test(opennebula): validate gen_conf() output against network-config-v2 schema#6855
Open
mcanevet wants to merge 1 commit intocanonical:mainfrom
Open
test(opennebula): validate gen_conf() output against network-config-v2 schema#6855mcanevet wants to merge 1 commit intocanonical:mainfrom
mcanevet wants to merge 1 commit intocanonical:mainfrom
Conversation
2 tasks
977fe0c to
eb4adea
Compare
Contributor
Author
|
Unit tests fails precisely because this new test shows a bug that #6856 fixes |
…2 schema Add an autouse fixture to TestOpenNebulaNetwork that wraps gen_conf() and runs jsonschema validation against schema-network-config-v2.json on every call, so all existing tests implicitly assert schema conformance.
eb4adea to
9c03944
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Commit Message
```
test(opennebula): validate gen_conf() output against network-config-v2 schema
Add an autouse fixture to TestOpenNebulaNetwork that wraps gen_conf() and
runs jsonschema validation against schema-network-config-v2.json on every
call, so all existing tests implicitly assert schema conformance without
requiring dedicated per-field type checks.
```
Additional Context
OpenNebula's
gen_conf()directly produces a Netplan v2 dict. Previously,no test validated the output against the network-config-v2 JSON schema, so
type errors (e.g. a field being a string when the schema requires an integer)
could go undetected. The autouse fixture catches any such regression across
all existing and future tests in the class for free.
Test Steps
Merge type