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

Support ansible v28+ #30

Merged
merged 8 commits into from
Feb 14, 2019
Merged

Support ansible v28+ #30

merged 8 commits into from
Feb 14, 2019

Conversation

kdelee
Copy link
Member

@kdelee kdelee commented Feb 12, 2019

@abadger trying it out here...

@kdelee kdelee changed the title [WIP] Ansible v27 [WIP] Ansible v28 another go at it Feb 12, 2019
@coveralls
Copy link

coveralls commented Feb 12, 2019

Pull Request Test Coverage Report for Build 190

  • 96 of 103 (93.2%) changed or added relevant lines in 7 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+3.3%) to 74.878%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pytest_ansible/module_dispatcher/v1.py 0 1 0.0%
pytest_ansible/module_dispatcher/v28.py 68 74 91.89%
Files with Coverage Reduction New Missed Lines %
pytest_ansible/module_dispatcher/v24.py 1 95.77%
pytest_ansible/module_dispatcher/v1.py 2 15.0%
Totals Coverage Status
Change from base Build 182: 3.3%
Covered Lines: 462
Relevant Lines: 617

💛 - Coveralls

For ansible 2.8+ need to clear command line args

Because ansible is creating an immutable global Singleton context with
the results of command line parsing.  So you have to "reset" that first,
before doing it again in a test.

Do this in a try/except block to keep backwards compatablity

make version comparison more flexible to handle 2.8 after release

Refactor has_ansible_version use

bugfix, test was right all along
@kdelee kdelee changed the title [WIP] Ansible v28 another go at it Support ansible v28+ Feb 14, 2019
@shanemcd shanemcd merged commit 8fc546a into ansible:master Feb 14, 2019
@kdelee kdelee deleted the ansible-v28 branch February 18, 2019 21:34
@edwinpjacques
Copy link

@jlaska is it possible to cut a new release of pytest-ansible? I'm using Ansible 2.8 and without this change I can't use pytest-ansible. If there's anything I can do to help, please let me know.

@jlaska
Copy link
Contributor

jlaska commented Jul 5, 2019

@edwinpjacques This code is now available in pytest-ansible-2.1.1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants