-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add test to make sure files are not being left open after sync tasks #1232
Conversation
427fc91
to
0061b12
Compare
""" | ||
pkg_mgr = cli.PackageManager(self.cfg) | ||
pkg_mgr.raise_if_unsupported(unittest.SkipTest) | ||
pkg_mgr.install('lsof') |
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.
@kersommoura I left this just as it was committed to pulp_file, but I kind of think it would be better if the test didn't try to do install or uninstall anything - just check if lsof
is available and skip if it isn't installed. The reason being, if the user already had lsof
installed, either individually or as a dependency for another application, wouldn't the next line would remove it from their system? I don't think we should be doing anything that would make permanent changes to the system configuration of the host machine.
I think it would make more sense to document dependencies like this and have the user (or the CI box configuration scripts) make sure they're installed if they want that test to be run.
Also, lsof
is installed on Travis (or maybe it's included by default with Ubuntu), so doing it this way is needlessly restrictive. If not for the code trying to interact with the system package manager this test would actually work fine in Travis and not need to be skipped.
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.
If you agree, I don't mind changing it both here and in pulp_file.
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.
@dralley, thanks for your working on this. I agree. What about we state in the test case something like...this test requires that lsof
is available. Otherwise test will be skipped.
99d3fd7
to
90f0413
Compare
90f0413
to
a313b66
Compare
@pulp/qe |
re #4073
https://pulp.plan.io/issues/4073