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
Move helper code for integration plugin #626
Conversation
|
From the PR description it is not clear what problem it solves or if it solves a problem. " Certain aspects of pytest are not available right away. For example pytest.config is generated after configuration stage but before discovery stage." Is a description of reality, not a problem. In other word. Why is this needed? And I'm not implying it is not needed, just the PR comment doesn't explain it. |
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 with one issue I commented inline. The helper scripts work with these commits. Thanks for fixing the issue.
ipatests/test_integration/util.py
Outdated
| @@ -17,51 +17,11 @@ | |||
| # You should have received a copy of the GNU General Public License | |||
| # along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
|
|
|||
| import time | |||
| import re | |||
|
|
|||
| from ipaplatform.paths import paths | |||
| from ipalib.constants import DEFAULT_CONFIG | |||
|
|
|||
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.
Since we are moving the modules into a package, why do we keep this module around? I do not know the rationale for the util module in here but the functions could move to ipatests/pytest_plugins/integration/tasks.py, with appropriate changes to test_legacy_clients, test_sudo and test_trust modules.
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.
Adding to this, shouldn't we move the ipatests/test_integration/base.py module as well?
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.
base.py provides base class for all integration tests. The pytest plugin doesn't depend on the base class directly IMO it makes more sense to keep it next to the test cases.
For the other functions in module, I don't really care. If you prefer to have them in tasks, I'm happy to move them, too.
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.
You're right that the plugin itself does not depend on the integration test base class. As for the functions in the utils module, please move them to tasks.
|
Thanks for the update |
|
@apophys Please create a ticket for the issue. This PR should not get merged until the issue is properly documented in a ticket and commit messages have been updated. |
|
will do |
The changes made to ipa-run-tests script in fd1b4f6 broke the ipa-test-config and ipa-test-task scripts which are not executed via pytest. To fix the issue, all helper code and dependencies of the integration plugin are moved out of ipatests.test_integration and into the integration plugin. As first step ipatests.pytest_plugins.integration is turned into a package. https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
https://pagure.io/freeipa/issue/6798 Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
@apophys has created ticket https://pagure.io/freeipa/issue/6798 and I have updated all commit messages. |
|
master:
|
fd1b4f6 broke integration tests because the integration helper imports code from ``ipatests.test_integration```.
Helper code for
ipatests.pytest_plugins.integrationwas inipatests.test_integration. This doesn't play nice with pytests auto-discovery of test cases. Certain aspects of pytest are not available right away. For examplepytest.configis generated after configuration stage but before discovery stage.Now all helper code is next to the plugin in
ipatests.pytest_plugins.integration(which is now a package).https://pagure.io/freeipa/issue/6798