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

Add tests for check_required_by and fix default return value #67871

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

relrod
Copy link
Member

@relrod relrod commented Feb 28, 2020

SUMMARY
  • Return an empty dict by default (for consistency with the other
    validators).
  • Sort the dictionary's .items() when we iterate to see if we need
    to throw. This is for consistency between python 2 and python 3 which
    sort .items() differently by default and could result in the user
    seeing a different error message based on python version.
  • Add some tests for check_required_by.

Signed-off-by: Rick Elrod rick@elrod.me

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • lib/ansible/module_utils/common/validation.py
  • tests

@ansibot ansibot added affects_2.10 bug core_review needs_triage python3 support:core labels Feb 28, 2020
- Return an empty dict by default (for consistency with the other
  validators).
- Sort the dictionary's .items() when we iterate to see if we need
  to throw. This is for consistency between python 2 and python 3 which
  sort .items() differently by default and could result in the user
  seeing a different error message based on python version.
- Add some tests for check_required_by.

Signed-off-by: Rick Elrod <rick@elrod.me>
@ansibot ansibot added needs_revision and removed core_review labels Feb 28, 2020
@samdoran samdoran removed the needs_triage label Mar 5, 2020
@ansibot ansibot added the stale_ci label Mar 13, 2020
@ansibot ansibot removed the stale_ci label Mar 26, 2020
@ansibot ansibot added stale_ci core_review and removed needs_revision labels Apr 3, 2020
@ansibot ansibot added needs_revision pre_azp and removed core_review stale_ci labels Dec 9, 2020
@ansibot ansibot added the needs_rebase label Feb 16, 2021
@nitzmahone
Copy link
Member

nitzmahone commented Mar 23, 2022

Not sure how gnarly this is to rebase (or if it's even still applicable) with the argspec changes, but looks like a good change if it's still valid...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug needs_rebase needs_revision pre_azp python3 support:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants