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

Closed
wants to merge 1 commit into 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 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. 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 This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 28, 2020
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Mar 5, 2020
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 13, 2020
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 26, 2020
@ansibot ansibot added stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 3, 2020
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pre_azp This PR was last tested before migration to Azure Pipelines. and removed core_review In order to be merged, this PR must follow the core review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 9, 2020
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 16, 2021
@nitzmahone
Copy link
Member

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...

@s-hertel s-hertel added the P3 Priority 3 - Approved, No Time Limitation label Aug 17, 2022
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Oct 24, 2023
@Akasurde
Copy link
Member

superseded by #84153

@Akasurde Akasurde closed this Oct 22, 2024
@ansible ansible locked and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. P3 Priority 3 - Approved, No Time Limitation pre_azp This PR was last tested before migration to Azure Pipelines. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants