Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create tests to validate schema examples #348

Conversation

lucasmoura
Copy link
Contributor

@lucasmoura lucasmoura commented May 5, 2020

Following this launchpad bug, we need to validate if the examples provided in the config module are conforming to the concatenated schema of all config modules. The rationale behind that is not only to verify if the examples are correctly written but to assert that no config schema is interfering with each other.

Also, but looking at the validate_cloudconfig_schema, I believe that will raise the SchemaValidationError by using strict=True, so I have only called the function pasisng the right schemas to compare.

LP: #1876412

@OddBloke OddBloke assigned OddBloke and blackboxsw and unassigned OddBloke May 6, 2020
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to have the additional fixes and this coverage to alert us to inconsistencies in schema docs.

I've hit the update branch button and will await CI before merging.
After this merges, I'll also manually update the related launchpad bug status to 'fix committed' and add a comment mentioning this specific upstream commit url.

@@ -61,9 +61,9 @@
snap:
assertions:
00: |
signed_assertion_blob_here
signed_assertion_blob_here
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent @lucasmoura, I'm glad this caught an invalid test config Too! Proof of a job well done.

@blackboxsw blackboxsw merged commit 022122a into canonical:master May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants