test: test for boolean values and null values are not allowed - #156
Merged
Conversation
This is the test for linux-system-roles#153 Signed-off-by: Rich Megginson <rmeggins@redhat.com>
Reviewer's GuideIntroduces a new Ansible test playbook that verifies the bootloader role rejects boolean and null values by triggering failures and asserting the correct error message. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @richm - I've reviewed your changes - here's some feedback:
- The three test blocks are nearly identical—consider parameterizing the value cases (true/false/null) in a loop to reduce duplication.
- In the “no boolean false values” block you still pass a quoted "true" for valid_value_1—swap it to "false" to match the test scenario.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The three test blocks are nearly identical—consider parameterizing the value cases (true/false/null) in a loop to reduce duplication.
- In the “no boolean false values” block you still pass a quoted "true" for valid_value_1—swap it to "false" to match the test scenario.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
==========================================
+ Coverage 78.43% 86.90% +8.47%
==========================================
Files 2 2
Lines 255 275 +20
==========================================
+ Hits 200 239 +39
+ Misses 55 36 -19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
[citest] |
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.
This is the test for #153
Signed-off-by: Rich Megginson rmeggins@redhat.com
Summary by Sourcery
Add tests to ensure boolean and null values are rejected in bootloader settings
Tests: