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

tests for InventoryModule error conditions #31381

Merged
merged 3 commits into from
Oct 16, 2017

Conversation

chrismeyersfsu
Copy link
Member

@chrismeyersfsu chrismeyersfsu commented Oct 5, 2017

SUMMARY

Fix possible err not defined when various error conditions are hit on Inventory import and stderr is empty from the importing inventory. Also increase test coverage.

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

script inventory plugin

ANSIBLE VERSION

2.5

@ansibot
Copy link
Contributor

ansibot commented Oct 5, 2017

@chrismeyersfsu Greetings! Thanks for taking the time to open this pullrequest. In order for the community to handle your pullrequest effectively, we need a bit more information.

Here are the items we could not find in your description:

  • issue type

Please set the description of this pullrequest with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/PULL_REQUEST_TEMPLATE.md

click here for bot help

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 needs_info This issue requires further information. Please answer any outstanding questions. needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 5, 2017
@ansibot
Copy link
Contributor

ansibot commented Oct 5, 2017

The test ansible-test sanity --test pep8 [?] failed with the following errors:

test/units/plugins/inventory/test_script.py:41:13: E306 expected 1 blank line before a nested definition, found 0
test/units/plugins/inventory/test_script.py:57:33: E225 missing whitespace around operator
test/units/plugins/inventory/test_script.py:62:1: W293 blank line contains whitespace
test/units/plugins/inventory/test_script.py:73:1: W293 blank line contains whitespace
test/units/plugins/inventory/test_script.py:84:1: W293 blank line contains whitespace
test/units/plugins/inventory/test_script.py:95:1: W293 blank line contains whitespace
test/units/plugins/inventory/test_script.py:101:1: W391 blank line at end of file

The test ansible-test sanity --test pylint [?] failed with the following errors:

test/units/plugins/inventory/test_script.py:62:0: trailing-whitespace Trailing whitespace
test/units/plugins/inventory/test_script.py:73:0: trailing-whitespace Trailing whitespace
test/units/plugins/inventory/test_script.py:84:0: trailing-whitespace Trailing whitespace
test/units/plugins/inventory/test_script.py:95:0: trailing-whitespace Trailing whitespace
test/units/plugins/inventory/test_script.py:101:0: trailing-newlines Trailing newlines

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Oct 5, 2017
@mattclay
Copy link
Member

mattclay commented Oct 6, 2017

CI failure in Python 3.x unit tests:

https://app.shippable.com/github/ansible/ansible/runs/39840/4/tests

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Oct 6, 2017
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Oct 6, 2017
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 6, 2017
@chrismeyersfsu
Copy link
Member Author

@mattclay I worked with @abadger to fix up these tests so they aren't failing. This PR is ready for merge.

@pilou-
Copy link
Contributor

pilou- commented Oct 8, 2017

@chrismeyersfsu as stated by the bot (#31381 (comment)) you should edit description of this pull request adding:

##### ISSUE TYPE
 - Bugfix Pull Request

then Ansibullbot will remove needs_info and needs_template labels.

@chrismeyersfsu
Copy link
Member Author

Looking to get these unit tests in. What else needs to be done?

@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 Oct 16, 2017
@mattclay mattclay removed needs_info This issue requires further information. Please answer any outstanding questions. needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly. labels Oct 16, 2017
@mattclay
Copy link
Member

rebuild_merge

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 16, 2017
@ansibot ansibot merged commit cf938e9 into ansible:devel Oct 16, 2017
mattclay pushed a commit that referenced this pull request Nov 8, 2017
* tests for InventoryModule error conditions

* modified unicode in tests to ahear to Ansible best practices

* flake8 fixes

(cherry picked from commit cf938e9)
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. 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.

None yet

5 participants