feat: Argument spec implementation for sudo role - #143
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #143 +/- ##
=======================================
Coverage ? 61.39%
=======================================
Files ? 2
Lines ? 487
Branches ? 0
=======================================
Hits ? 299
Misses ? 188
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| sudo_sudoers_files defaults items must be strings or | ||
| mappings, got {{ item | type_debug }} | ||
| loop: "{{ sudo_sudoers_files | selectattr('defaults', 'defined') | ||
| | map(attribute='defaults') | flatten }}" |
There was a problem hiding this comment.
| | map(attribute='defaults') | flatten }}" | |
| | map(attribute='defaults') | flatten | list }}" |
for ansible 2.9 compatibility always add | list to the end of filter pipelines that produce a list
| list of strings, got {{ item.selinux_role | type_debug }} | ||
| loop: "{{ sudo_sudoers_files | ||
| | selectattr('user_specifications', 'defined') | ||
| | map(attribute='user_specifications') | flatten }}" |
| list of strings, got {{ item.selinux_type | type_debug }} | ||
| loop: "{{ sudo_sudoers_files | ||
| | selectattr('user_specifications', 'defined') | ||
| | map(attribute='user_specifications') | flatten }}" |
|
[citest] |
Enhancement: Added argument spec and assert role spec validation to the sudo role. Also wrote tests for it found in tests/tests_invalid_input.
Reason: Because it is a good addition to the linux-system-roles project.
Result: Successfully added it and prepared tests for it. I used AI during this implementation.
Issue Tracker Tickets (Jira or BZ if any): linux-system-roles/postfix#206 https://redhat.atlassian.net/browse/RHELMISC-16008