-
Notifications
You must be signed in to change notification settings - Fork 654
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
Refactored import_playbook tests #951
Conversation
Updated our import_playbook tests to match ansible implementation of import_playbook and to avoid hitting ansible syntax check failures with our own testing playbooks. Needed-By: #950
63434b5
to
88c1904
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a few comments
assert len(results) == 2 | ||
# Assures we detected the issues from imported playbook | ||
assert 'Commands should not change things' in results_text | ||
assert '502' in results_text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now 502 is expected
- hosts: localhost | ||
tasks: | ||
- command: echo "no name" # noqa 502 | ||
post_tasks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer importing as post_tasks, hope this does not lose coverage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. This is what I wanted.
Updated our import_playbook tests to match Ansible implementation of import_playbook and to avoid hitting Ansible syntax check failures with our own testing playbooks.
Ansible can only import playbooks at top level, not via tasks thus our testing was incorrect.
Needed-By: #950