-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Skip tests with unsatisfied deps #55853
Skip tests with unsatisfied deps #55853
Conversation
\cc @mattclay |
@mattclay I'm not quite sure why the cloudstack test is failing now.... The pytestmark to skip the test on python-2.6 is functioning correctly locally. I can change it to skip the test if it's on python-2.6 in a different way (it was using unittest before).... I'm just not sure why this syntax is failing in our setup. |
e342ee2
to
901ce52
Compare
@mattclay, I figured out what my mistake was. The test was failing when it tested whether it could import the cs module. The toplevel code in the test all runs and registers whether any of the conditions would cause it to skip. Since I was trying to import Should work now! 🤞 |
ready_for_review :-) |
If either on Python-2.6 or the cs library is not installed we cannot run this test so skip it
901ce52
to
9d6266f
Compare
* Skip gitlab tests if dependencies aren't met * Skip certain unittests if passlib is not installed * Fix tests with deps on paramiko to skip if paramiko is not installed * Use pytest to skip for cloudstack If either on Python-2.6 or the cs library is not installed we cannot run this test so skip it (cherry picked from commit 8acf71f) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
* Skip gitlab tests if dependencies aren't met * Skip certain unittests if passlib is not installed * Fix tests with deps on paramiko to skip if paramiko is not installed * Use pytest to skip for cloudstack If either on Python-2.6 or the cs library is not installed we cannot run this test so skip it (cherry picked from commit 8acf71f) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
* Skip gitlab tests if dependencies aren't met * Skip certain unittests if passlib is not installed * Fix tests with deps on paramiko to skip if paramiko is not installed * Use pytest to skip for cloudstack If either on Python-2.6 or the cs library is not installed we cannot run this test so skip it
* Skip gitlab tests if dependencies aren't met * Skip certain unittests if passlib is not installed * Fix tests with deps on paramiko to skip if paramiko is not installed * Use pytest to skip for cloudstack If either on Python-2.6 or the cs library is not installed we cannot run this test so skip it. (cherry picked from commit 8acf71f) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
* Skip gitlab tests if dependencies aren't met * Skip certain unittests if passlib is not installed * Fix tests with deps on paramiko to skip if paramiko is not installed * Use pytest to skip for cloudstack If either on Python-2.6 or the cs library is not installed we cannot run this test so skip it. (cherry picked from commit 8acf71f) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
…5853) * Skip gitlab tests if dependencies aren't met * Skip certain unittests if passlib is not installed * Fix tests with deps on paramiko to skip if paramiko is not installed * Use pytest to skip for cloudstack If either on Python-2.6 or the cs library is not installed we cannot run this test so skip it. (cherry picked from commit 8acf71f) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>. (cherry picked from commit 7d4e9b2) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
SUMMARY
Tests for modules or other plugins whose deps fall outside of ansible's core dependency set need to check whether the deps are installed and skip if they are not.
This PR skips for several tests which were found to be running even when their deps were not installed.
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
backport to 2.8 when merged.