-
Notifications
You must be signed in to change notification settings - Fork 44
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
[Enabler] [conftest.py] Hot fix for testing the collection in Ansible 2.17.1 #1772
Conversation
@rexemin I see this PR is ready for review but no reviewers were assigned. I'm reviewing this, just one question, I see the screenshots are tested with 2.17.1, is this not breaking testing functionality for 2.15 and 2.16 ? |
Thanks for reviewing, it should still be on draft mode, that's a mistake on my part. I've been testing the changes for 2.16, but I still need to make sure it works fine with 2.15 too |
The whole test suite passed on 2.16.7. Still testing on 2.15 to make sure nothing breaks. |
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.
Your change also cover a lot of warning we had on pytest, great
The test suite was successful on Ansible 2.15.5. |
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
Hi @rexemin - I see this was approved, my questions are really just for peace of mind.
This was a good option to inject our vars, good solution. |
@ddimatos regarding point 1: not really, we had a PR that changed most commands to use multi-line strings a couple of months ago, but the ones I've changed in this PR were overlooked at the time. I think we have changed all commands in the test suite at this point. For points 2 and 3: I have not tested with |
SUMMARY
Fixes #1670.
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
Instead of passing the environment variables through the interpreter string, now we decorate the Ansible engine function that computes the environment string.
Some changes were needed to fix a couple of tests. Most changes were related to escaping shell commands and were failures even when running on
dev
with Ansible 2.16. Changes directly related to this PR are the ones made to tests for zos_copy and zos_fetch, as well as theusers.py
helper.Changes to the config
This changes how the config should look like in Jenkins. When testing on Ansible >=2.17.1, we need to remove the
PYTHONSTDINENCODING
variable and change the value of_CEE_RUNOPTS
to"FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
(notice how we will not use an extra pair of single quotes now).The new config for Jenkins should be like this:
When running Ansible 2.16 or 2.15, the only change needed is to remove the pair of single quotes from
_CEE_RUNOPTS
, and thus the config should look like this:Running locally
To run locally, the same config should work, but in case you're getting garbage as output when using Ansible 2.16 or 2.15, try removing
PYTHONSTDINENCODING
and see if that fixes the issue.